Jump to content

Recommended Posts

Posted

Hi. I know this problem has been brought up before, but I've been unable to find a clear example of how to deal with the change.

This is the class:

public class TutorialRenderRegistry {
	public static void registryEntityRender() {
		RenderingRegistry.registerEntityRenderingHandler(StarterEntity.class, new StarterEntityRender.RenderFactory());
	}
}

The registerEntityRenderingHandler function gives the following error:

Quote

The method registerEntityRenderingHandler(EntityType<T>, IRenderFactory<? super T>) in the type RenderingRegistry is not applicable for the arguments (Class<StarterEntity>, StarterEntityRender.RenderFactory)

 

I understand the problem is this is how it was done in 1.14 and before, and that it changed in 1.15 and later. The way of doing it uses generics, which I don't fully understand. I know it is a simple fix, but I'm looking for a clear example of how to use registerEntityRenderingHandler in 1.15/1.16

 

 

Posted
3 hours ago, MakeItSimple said:

The registerEntityRenderingHandler function gives the following error

Have you ever looked at registerEntityRenderingHandler?
you don't need a class and your own factory, you need an EntityType and the minecraft factory.

like this:

		RenderingRegistry.registerEntityRenderingHandler(ModEntityType.JADE_ARROW.get(), JadeArrowRender::new);

 

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.