Jump to content

Link entity model with entity render file?


Parent

Recommended Posts

Hey, I wanted to know how I would link an entity's model file (.java exported from blockbench) and the entity itself. Can't seem to figure that out. 

Here's my entity code:

public class headcrabEntity extends ChickenEntity{
	@SuppressWarnings("unchecked")
	public static EntityType<headcrabEntity> 
	TYPE = (EntityType<headcrabEntity>) EntityType.Builder.create(headcrabEntity::new, EntityClassification.MONSTER).build("headcrab").setRegistryName(BaseMod.MODID, "headcrab");
	public headcrabEntity(World worldIn){ super(TYPE, worldIn); }
	public headcrabEntity(EntityType type, World worldIn) { super(type, worldIn); }
	public static Item EGG = EntityUtils.buildEntitySpawnEgg(TYPE, 0xb00101, 0xacbf1f);
	public static AttributeModifierMap.MutableAttribute setupAttributes() {
		return EntityUtils.addAttributes(false,40,30.0d,10,0,8.0d,2,10);
		}
	
}

Thanks

Link to comment
Share on other sites

You need to create an EntityRenderer for your Entity, register the Renderer in the FMLClientSetup use RenderingRegistry#registerEntityRenderingHandler, also take a look at some vanilla examples how to render an Entity

Edited by Luis_ST
Link to comment
Share on other sites

  • 4 weeks later...

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.