Posted April 22, 20223 yr Hello. I've made a custom mob with Geckolib, which works fine. However, I want this mob to grow dynamically as it ages, rather than just popping into its adult appearance like vanilla mobs. I've managed to get this working somewhat, but there are a few problems: The mob still grows when the singleplayer client is paused. The mob only grows if it's on screen; if it's, say, behind the player, then it will never grow. Now I know these issues are caused by putting the growth code in the render method in my mob's renderer, but I have no idea where else I should put it. After doing some research, I found I should be using the scale method, but as I'm using a GeckoLib renderer (GeoEntityRenderer<>), this method does not exist for me. If anyone has any ideas in how I could either work around this issue, or some other way of solving this, that would be great. Cheers!
April 22, 20223 yr Author Thank you for the quick reply! I've moved the growth code into the tick method and made that update a field I've saved with EntityDataAccessors. However, if I try and update the size in the render method using this, the entire model rendering breaks. The entity has no hitbox, cannot be pushed, and when it's killed, it remains in the world. Am I missing something?
April 22, 20223 yr Author My entity renderer class: https://paste.ofcode.org/g2U4evwc6Lh2ZAGDzsTyGw My shared entity class: https://paste.ofcode.org/CBun4FdaSZHuYJvPLxapjP My specific entity class: https://paste.ofcode.org/EDt6dhxz4ZC2qCfNRDnK5f My entity model code: https://paste.ofcode.org/BdRAhZNFEc76ixgM2sYbYk
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.