Hello everyone.
I'm currently working on a mod, where I have a block, which has a TileEntity, with a custom model. The TileEntity model has a movable part in it, of which the TileEntity tells it's current state. The TileEntity also has a second value, Energy, which will tell the renderer what texture to use. In my TileEntitySpecialRenderer extended class, I've got this function:
@Override
public void renderTileEntityAt(TileEntity var1, double var2, double var4, double var6, float var8) {
this.renderAModelAt(var2, var4, var6, ((TileEntityTPPeripheral)var1).Energy, ((TileEntityTPPeripheral)var1).ChestConnection);
}
Now when it executes renderAModelAt(); I've put in some debugging messages, and I've gotten the following output:
Energy: 0
ChestConnection: 3
Texture: 0.png
The ChectConnection variable ( that first variable that makes a part move ) is working here, but the Energy variable should be 10000.
I've also added an onblockactivated check on the block of the tile entity to check the Energy there, and there it is actually saying 10000.
The texture doesn't really matter in this debugging result, since that's determined by the currently incorrect energy value.
If anyone has a clue of what I'm doing wrong I'd be glad to hear