Jump to content

[Solved][1.14.4] Render a custom entity - the dreaded white cube


Mojius

Recommended Posts

I'm trying to make a new custom entity but I still get the white cube. Here's what I'm doing.

-I build my GrassmanModel by extending a BipedModel, and call the super constructor with the right parameters, as well as the super render.

-in the render (extending LivingRender) I super construct with EntityRendererManager as a param - in this class I also get the texture and create a render factory.

-In my client proxy during the FMLCommonSetupEvent, I render my entity rendering handler with parameters of my grassman entity class and a new grassman render factory.

-In my common registry events class I register my entity as I see fit.

-Also, in my Entity Init I of course initialize my grassman.

 

The texture is a renamed Zombie texture, with the exact pixels replaced with my grassman texture - its size is kept at 64x64 like what it's based on.

 

Still getting a white cube when I /summon. Why? I know this is a really complex issue, but I was hoping someone could help.

 

My code:

GrassmanModel

https://pastebin.com/qcYaS7UE

GrassmanEntity (kind of a mess in terms of AI but shouldn't affect the render)

https://pastebin.com/mvVtFevm

GrassmanRender

https://pastebin.com/LZsewnfb

InitEntity

https://pastebin.com/BpBxXJqk

ClientProxy

https://pastebin.com/3i8KaHzz

Main mod class

https://pastebin.com/frvi0DzF

Edited by Mojius
Link to comment
Share on other sites

Here's my RegistryEvents.java.

https://pastebin.com/j9RyDL8U

 

You're right - it calls for it to be loaded at a different time. I moved it to

private static void ForgeClientEvent(FMLClientSetupEvent event)
	{
        RenderingRegistry.registerEntityRenderingHandler(GrassmanEntity.class, new GrassmanRender.RenderFactory());
	}

in my main mod class. Still getting an error. And I know that's a terrible name for the method. Working it out as I go.

 

Also, I didn't see the first thing you said. I will try using side-specific event handlers.

Edited by Mojius
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.