Topic category: Advanced modding
I want to give a block a conditionally animated model, I already know a tile entity will be required for this. I am also aware that I'm going to have to write code myself for this to work.
Here's a basic rundown of what I'm trying to do:
- Put a custom model on a tile entity
- Trigger an animation when an NBT number tag on the tile entity is greater than 0
I don't need any help with adding the animation itself (unless animations work differently on tile entities than they do on mobs)
Update: people keep suggesting that I use a static model with an animated texture. This is not what I am looking for.
Creating a TESR seems to be the way to go, but I don't really know how to do that.
Most importantly though, and this is something nobody has told me about yet, is how to get the tile entity's NBT data and use it in arbitrary locations throughout the entity's code (like within the animation function).