Posted May 22, 201312 yr Hi guys, Managed to get my proximity detector working with my gui, but i have a small bug at the moment which i'm not too sure about. The debug lines i added to my code to see what it was doing are saying that the variable is not being reset in the client. This doesn't appear to be having any real effect but i don't like the idea that it's there and would rater fix it so it doesn't break anything in the future, also i've got a feeling it's the reason there's a small amount of flickering in the texture when the field is toggled off. the console output making me think this: //first loaded 2013-05-22 16:36:15 [iNFO] [sTDOUT] null+ANALOG+|true 2013-05-22 16:36:15 [iNFO] [sTDOUT] null+ANALOG+|false //PLAYERS field activated 2013-05-22 16:36:23 [iNFO] [sTDOUT] null+PLAYERS+ANALOG+|false 2013-05-22 16:36:23 [iNFO] [sTDOUT] null+PLAYERS+ANALOG+|true //PLAYERS field deactivated 2013-05-22 16:23:38 [iNFO] [sTDOUT] null+PLAYERS+ANALOG+|true 2013-05-22 16:23:38 [iNFO] [sTDOUT] null+ANALOG+|false the true and false bits are the output from worldObj.isRemote in the tileentity the null at the start exists due to how i load the data from the nbt, don't think it should be causing any problems and the fix is simple enough, just an extra if statement to see if the field exists in the nbt before trying to add anything to the set. block code:https://github.com/Yagoki/MTech/blob/master/MTech/mtech/block/BlockProximityDetector.java tileentity code:https://github.com/Yagoki/MTech/blob/master/MTech/mtech/tileentity/TileEntityProximityDetector.java gui code: https://github.com/Yagoki/MTech/blob/master/MTech/mtech/client/gui/GuiProximityDetector.java packet handler code: https://github.com/Yagoki/MTech/blob/master/MTech/mtech/handler/packet/MyPacketHandler.java if you need anymore of my code it's all on there, and should all be the latest push. [EDIT] fixed it, the problem was i was the list on the client wasn't removing stuff, fixed it by adding a method to clear the Set before it is updated in the onDataPacket method in the tileentity github
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.