Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Register Entity Model


Recommended Posts

You don't need ro register your model at all..but if you want your entity model to be rendered on the screen you need to call that model render method somewhere, and the place to do that is your entity renderer: I suggest you take a look at how vanilla uses models inside entity renderers

Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port

Link to post
Share on other sites
1 hour ago, Beethoven92 said:

but if you want your entity model to be rendered on the screen you need to call that model render method somewhere

I added this to my code, but it is still appearing untextured:

final CorruptPearlModel model = new CorruptPearlModel();
@Override
public void render(CorruptPearlEntity entityIn, float entityYaw, float partialTicks, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int packedLightIn) {
  model.render(matrixStackIn,
    bufferIn.getBuffer(RenderType.getEntityTranslucent(getEntityTexture(entityIn))),
    packedLightIn,
    0,
    0,
    0,
    0,
    1);
}

 

1 hour ago, Beethoven92 said:

I suggest you take a look at how vanilla uses models inside entity renderers

I cannot seem to find an entity renderer or model for ender pearls

Link to post
Share on other sites
On 3/16/2021 at 8:47 PM, NullDev said:

I added this to my code, but it is still appearing untextured:

I also tried this, because vanilla seems to use matrixStackIn.push() but still nothing:

final CorruptPearlModel model = new CorruptPearlModel();
@Override
public void render(CorruptPearlEntity entityIn, float entityYaw, float partialTicks, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int packedLightIn) {
  matrixStackIn.push()
  model.render(matrixStackIn,
    bufferIn.getBuffer(RenderType.getEntityTranslucent(getEntityTexture(entityIn))),
    packedLightIn,
    0,
    0,
    0,
    0,
    1);
}

 

Link to post
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.

Guest
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.



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.