Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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?

  • 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?

Try this:

private static final ResourceLocation textureLocation = new ResourceLocation(TutorialMod.modid, "textures/models/Wandering_Entity.png");

  • 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

  • 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. xD

 

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.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.