Parent Posted July 8, 2021 Posted July 8, 2021 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 Quote
Luis_ST Posted July 9, 2021 Posted July 9, 2021 (edited) 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 July 9, 2021 by Luis_ST Quote
poppakap Posted August 5, 2021 Posted August 5, 2021 Sorry but, where did the RenderingRegistry class move to? It is commented out in the 1.17.1-37 version I have now Quote
Luis_ST Posted August 5, 2021 Posted August 5, 2021 On 8/5/2021 at 4:30 PM, poppakap said: Sorry but, where did the RenderingRegistry class move to? It is commented out in the 1.17.1-37 version I have now Expand use the vanilla method EntityRenderers#register Quote
Recommended Posts
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.