Started by
Law17
on
Topic category: Help with Minecraft modding (Java Edition)
i want to figure out how to make an entity display an item in their hand when right clicked on, like the allay or tuff golem, it would be great if anyone could help out
Only possible with biped models
could i render the model as biped but its not biped?
I don't think this is possible without modifying the code of the entity itself through the "edit as code" button.
Besides using Biped model, of course.
Unfortunately, this doesn't appear to be possible without custom code.
The biped models appear to have special code on their models that update based on what they are holding.
This, the only line of code I could find that represents this, doesn't even reference the model:
this.setItemSlot(EquipmentSlot.MAINHAND, new ItemStack(<insert_mod_item_here>.get()));
Even looking in the renderer code, it doesn't reference the mainhand/offhand item models.
another option, and hear me out, is to make the entity model with the item in-hand already. Unfortunately, this would mean you can't use bows and the item can't be swapped or randomized.
Other than that, only Biped entities can hold items in-hand
Dear user, Is the entity you want to display the item in the hand of custom?
TheVoidShadows, could you elaborate on how could that be done?