Posted July 23, 201411 yr Hiya guys, trying to figure out how to do this, I've followed a couple tutorials on the internet to just simply add mobs and what not. Now I have the default biped model, like the player character and villagers and such, but for whatever reason, it absolutely refuses to add the texture to the model, so it's just the jumbled black and purple boxes. Curious if anyone can help me, here's the code: RenderTest.java import net.minecraft.client.model.ModelBiped; import net.minecraft.client.renderer.entity.RenderBiped; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; public class RenderTest extends RenderBiped { private static final ResourceLocation textureLocation = new ResourceLocation(TutorialMod.modid + ":" + "textures/models/Wandering_Entity.png"); public RenderTest(ModelBiped model, float shadowSize) { super(model, shadowSize); } @Override public ResourceLocation getEntityTexture(Entity par1Entity) { return textureLocation; } } testEntity.java import net.minecraft.entity.monster.EntityMob; import net.minecraft.world.World; public class testEntity extends EntityMob { public testEntity(World par1World) { super(par1World); } } TutorialMod.java preInit event to load it. @EventHandler public void preInit(FMLPreInitializationEvent event) { registerEntity(testEntity.class, "testEntity"); proxy.registerRenderers(); } I have the Wandering_Entity.png in the textures/models/ folder. I've tried changing the directory to other things, but no dice. I've made sure it isn't accidentally .png.png or anything.. I'm really at a loss on this one, but I'm sure it's something simple I'm overlooking, as it usually is. I don't think the ClientProxy or CommonProxy matters, as it is making the entity in game, but it's just lacking textures?
July 23, 201411 yr Author It's just a simple: [Client thread/WARN]: Failed to load texture: minecraft:TutorialMod/textures/models/Wandering_Entity.png java.io.FileNotFoundException: minecraft:TutorialMod/textures/models/Wandering_Entity.png I'm assuming the issue is that it's adding the "minecraft:" part. The rest of the directories are right, but I'm guessing it can't find where "minecraft:" starts correctly?
July 23, 201411 yr Try this: private static final ResourceLocation textureLocation = new ResourceLocation(TutorialMod.modid, "textures/models/Wandering_Entity.png");
July 23, 201411 yr Author Nope. No dice. [Client thread/WARN]: Failed to load texture: TutorialMod:textures/models/Wandering_Entity.png java.io.FileNotFoundException: TutorialMod:textures/models/Wandering_Entity.png
July 23, 201411 yr Author Aaand right you are. After renaming everything to tutorialmod instead of TutorialMod, it's working. Damn it. Going to have to replace quite a few lines. Thanks for the help!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.