Hi
I got my TileEntity working good now, now I want to add a type of render to it, and looking through the wiki the optimal way of doing it would be to use a TileEntityRendererFast. I would not say my TileEntity would be hard to render as it would only have to render a cuboid with varying alpha and texture depending on the TileEntity variables.
The issue I'm facing is that I have no idea how to do that, and better yet how to send the data to the client efficiently. I have it do stuff every tick, which is only changing one variable out of the three variables it stores, so I'm pretty sure using a custom message protocol is needed. The other two is what texture to use and whenever it should do a particle effect at the block (same texture). But I'm a bit lost about all this, going to write a summary and what little code I have on the TileEntityRendererFast and the actul TileEntity below:
A Tree Tap you place on a tree, I got the bucket and actual Tree Tap model working fine. The TileEntity stores what type of liquid it is (resin, water or none), whenever it can make the "bucket" start filling up with a particle effect and what volume there is in the bucket.
Something I was wondering is if there is a way to have a if statement that would only pass like every other tick or less, to simulate viscosity of different fluids and have the "drip" animation only happen that tick or something. That would also free up some of the network if I only need to send new information that particular tick.
TreeTapTileEntityRenderer.java
TreeTapTileEntity.java