[Unsolved] How to give a tile entity an animated model

Started by clarence112 on

Topic category: Advanced modding

Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[Unsolved] How to give a tile entity an animated model
Mon, 09/23/2019 - 22:01 (edited)

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

Edited by clarence112 on Mon, 09/23/2019 - 22:01
Joined Jan 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I just use a second block…
Fri, 09/20/2019 - 13:48

I just use a second block thats a duplicate of the first, just with an animated texture.

Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Wont work, not smooth and…
Fri, 09/20/2019 - 13:56

Wont work, not smooth and not conditional

Joined Jan 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I mean, i found a way to…
Fri, 09/20/2019 - 13:59

I mean, i found a way to make it work based on block update conditions. I personally rarely use NBT data for much. Ima look into how to streamline doing this stuff without secondary blocks.

Joined Apr 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I did a tutorial about that…
Mon, 09/23/2019 - 21:21

I did a tutorial about that long time ago, you can find it here
https://mcreator.net/wiki/advanced-video-tutorials

The process is exactly the same this days
but if you also want to make Large weapons than you can directly access its Json file from MCreator Now :)

Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks for trying to help,…
Mon, 09/23/2019 - 21:54

Thanks for trying to help, but this is the same method as was suggested above.

I specifically need a tile entity, as the animation needs to change based on NBT data and other variables, and a static model with animated textures just doesn't have the flexibility I need.

Think like a gauge that rotates based on how many items are stored in the block, or a counter that measures the length of a redstone pulse in ticks.

Joined Apr 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Then there is no other way…
Mon, 09/23/2019 - 22:59

Then there is no other way than changing the state of your tile entity with actual coding sorry :c