Started by
F0g_
on
Topic category: Help with Minecraft modding (Java Edition)
esterday I tried to add a mob that would pick up blocks, like an enderman, in my mod. But I couldn't figure out how to make the block item render on the mob. I tried to figure out how the item is rendered on the witch, but I don't understand Java enough to be able to use that in my mob
Does anyone know how I could do this?
(I'm using Geckolib, if that makes any difference)
Thank you!
Edited by F0g_ on Sat, 01/27/2024 - 18:39
You would probably need an internal storage which holds 1 block, I would assume making it pick a block, removing it, and adding it to its inventory are easy enough, as for rendering you would need a separate model with that block as a placeholder, and have it use textures based on the block in it's inventory. unfortunately. I'm not too experienced with Geckolib, but you could use the model layers tab(for entities) to manually change the texture for the block, which is gonna suck if they can hold all blocks, but otherwise you would need to custom code this. I hope I was able to help somewhat.