Posted January 25, 201312 yr 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
January 25, 201312 yr I had the same desync trouble between client and server parts of the game. The container class should solve your problem: just override methods public void addCraftingToCrafters(ICrafting par1ICrafting) public void detectAndSendChanges() @SideOnly(Side.CLIENT) public void updateProgressBar(int index, int value) (you can find out what they should do in ContainerFurnace class) these methods are required for proper syncing between client and server TE http://www.minecraftforum.net/topic/1871576-152-161forgealchemy-enhance-your-brewing-expirience-now-with-downloads/ Check it out!
January 25, 201312 yr Author Thanks a lot! used the Packet132TileEntityData packet if other people are wondering. -note: an issue I had with the packet was that I kept getting nullpointerexceptions on world loading, now this was just me being stupid, ( nullpointerexceptions usually mean you did something stupid but anyways), What I was doing wrong, in the Packet, make sure you assign a new NBTTagCompound() to customParam1 before you start putting stuff in it :3
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.