Jump to content

thely

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by thely

  1. Oh, duh, of course the right answer is the easy one. The textures are working now - thank you so much, TGG! -Thely
  2. Thank you so much! After doing a print statement, I saw that my basePath was pointing to mcp/bin/minecraft. That might be correct later, but it's certainly not now! I'm a little confused on how I'm supposed to use this, though. Am I supposed to set my basePath? Doesn't that have bad implications later if I release the mod, since no one will have the same basePath as me? Sorry for all the noob questions! I'm new to the modding business.
  3. Huh. So I installed Eclipse just to see if it would catch things the compiler wasn't. It pointed me to a few packaging errors that I'd created because I decided to try the package structure mrkirby has. I hit run to start, Eclipse compiles everything, and lo and behold, there are my crappy textures! "Well maybe that fixed it," says I, and for kicks, I try startclient.bat to see if the small changes stuck. The client loads, and not only are the block IDs different, making the world created in Eclipse unusable, the textures don't load either. So this means that either startclient.bat is missing something, Eclipse is running extra scripts in addition to startclient.bat that the internet hasn't told me about, or I'm missing some metadata in a folder that startclient.bat would be able to latch on to. The block ID thing is a little worrisome also. It's the same code, so why does running it from another IDE alter the block IDs?
  4. Still not working. Yours is the first compiling IconRegister example I've tried, though! I'm doing everything from the command line (powershell, not cmd), and editing in Vim. The package hierarchy in the first post is how the folders are arranged under forge/mcp/src/minecraft.
  5. Didn't work, but I tried a couple other things and I'm at least getting errors now (if I wasn't before). I know this means that one of these ResourceManagers can't find my file, but I can't tell if that means I put the file in the wrong place, or if it means I shouldn't be dealing with ResourceManagers at all (google searches make it look like this is only used for custom GUIs?). Currently mucking through the classes listed in the first three "at file: line" statements, because I hate running ./recompile.bat over and over to see if something works. It's probably a total waste of time to rummage through all the code, but it's an enlightening total waste of time. Lines from GenericBlock that are causing these errors: this.TEXTURE = new ResourceLocation(Generic.modid, "textures/blocks/genericblock.png"); FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE); And the relevant bits of the stack trace: [00:45:50] 2013-10-06 00:45:50 [WARNING] [Minecraft-Client] Failed to load texture: generic:textures/blocks/genericblock.png [00:45:50] java.io.FileNotFoundException: generic:textures/blocks/genericblock.png [00:45:50] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) [00:45:50] at net.minecraft.client.renderer.texture.SimpleTexture.loadTexture(SimpleTexture.java:31) [00:45:50] at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:84) [00:45:50] at net.minecraft.client.renderer.texture.TextureManager.bindTexture(TextureManager.java:41) [00:45:50] at tutorial.generic.GenericBlock.<init>(GenericBlock.java:22) [00:45:50] at tutorial.generic.Generic.preInit(Generic.java:43) [00:45:50] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [00:45:50] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [00:45:50] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [00:45:50] at java.lang.reflect.Method.invoke(Method.java:601) [00:45:50] at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:545) [00:45:50] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [00:45:50] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [00:45:50] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [00:45:50] at java.lang.reflect.Method.invoke(Method.java:601) [00:45:50] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) [00:45:50] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
  6. I already do. This line in the constructor evaluates to "generic:genericitem": String s = Generic.modid + ":" + (this.getUnlocalizedName().substring(5)); I've done print statements to make sure.
  7. Edit: For a solution to this problem, look at TGG's post at the bottom of this thread. I'm sure you all will figure out the problem in seconds, but I haven't been able to find a working solution yet. I'm just starting out and learning how to mod, and I'm working through the basic tutorials on the wiki. No matter what I do, I'm getting the "using missing texture: unable to load" error for my textures. Folder hierarchy: forge/mcp/src assets generic textures blocks genericblock.png genericore.png items genericitem.png genericingot.png tutorial generic Generic.java GenericBlock.java (etc) assets - figured I'd try it here for kicks generic textures (same as before) Relevant lines in files. I'm leaving out a lot of lines for brevity, but I assure you that the full versions all compile. Most of this code is taken from the Icons and Textures tutorial, with some bits and pieces taken from other guides. Generic.java: @Mod(modid=Generic.modid, name="Generic", version="0.0.0") public class Generic { public static final String modid = "generic"; public static Item genericItem; @EventHandler public void preInit(FMLPreInitializationEvent event) { genericItem = new GenericItem(500); } } GenericItem.java: public class GenericItem extends Item { public GenericItem(int id) { super(id); setUnlocalizedName("genericitem"); String s = Generic.modid + ":" + (this.getUnlocalizedName().substring(5)); setTextureName(s); } } I've tried the Wuppy way of going through the IconRegister, this way of using a ResourceLocation object, and setting setTextureName in the constructor (and in the main mod file) as I'm doing here. No dice! Help me, Obi Wan Kenobi, you're my only hope. (Note: if in fact I solve this problem before anyone's able to reply, I'll post the problem/solution and hopefully anyone googling in the future will find it.)
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.