Jump to content

First Mod, trying to add a texture to a biped entity model


Milkshakes00

Recommended Posts

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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