Jump to content

How to register a entity renderer in 1.16.5


CrazyKZB

Recommended Posts

I am new to the forge API and could only find information about DefferredRegister for blocks and items. So I attempted to use IRenderFactory, but found out that in 1.16- they dont use classes anymore, but EntityTypes. I attempted to use my entity type that I had for the custom entity, but it took in a EntityType<?> so when I used it. It gave an error. If anyone has had this error before and found a solution please tell me what you did. 

Link to comment
Share on other sites

Sorry for the late response. Here is what I used

//The Entity Type
public static EntityType<EntityChupacabra> RChupacabraEntity = (EntityType<EntityChupacabra>) EntityType.Builder.create(EntityChupacabra::new, EntityClassification.MONSTER).build(Test.MOD_ID + ":EntityChupacabra").setRegistryName(Registration.location("EntityChupacabra"));
 
//The RenderRegistry
RenderingRegistry.registerEntityRenderingHandler(EntityRegistration.RChupacabraEntity,new RenderChupacabra.RenderFactory());

 

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.