Posted August 1, 201312 yr Okay, I don't normally ask questions, but this is really weird and I can't track it. So I have several items in my mod that have "charge up" functions. They use a combination of onItemRightClick() and onPlayerStoppedUsing() in order to perform. However, one of these items has the Client and Server sides syncing properly, and another does not. For example, I added printouts to EntityPlayer and ItemStack methods, and this is what I get for the broken item: 2013-08-01 15:50:39 [iNFO] [sTDOUT] Player: CLIENT 2013-08-01 15:50:39 [iNFO] [sTDOUT] ItemStack CLIENT 2013-08-01 15:50:39 [iNFO] [sTDOUT] CLIENT 2013-08-01 15:50:39 [iNFO] [sTDOUT] Player: SERVER With the properly syncing item, ItemStack SERVER and SERVER will print out below Player: SERVER. I am not sure what is causing this. Has this happened to anyone else? Does anyone have a solution?
August 1, 201312 yr do you mind showing us some code ? but it hasnt happened to me the other thing (a tip) maybe if you had some baseItem that implements these "charge" effect for you would prevent problem like this, it would either not work at all or everything works aka onItemRightClick(){ [...] if(timeUse > getTriggerTime()){ triggerEffect(); } } abstract getTriggerTime(); abstract triggerEffect(); jsut suggesting how to debug 101:http://www.minecraftforge.net/wiki/Debug_101 -hydroflame, author of the forge revolution-
August 1, 201312 yr Author Never mind, I fixed it. Was using hard values instead of overriding getMaxItemUseDuration(). I feel pathetic.
August 1, 201312 yr these happen still consider making a base item if its worth (i dont know what you're actually trying to do :\ how to debug 101:http://www.minecraftforge.net/wiki/Debug_101 -hydroflame, author of the forge revolution-
August 1, 201312 yr Author Can't do a base item since they are different types of items. One is an extension of ItemAxe, the other is just Item. I would have done a base item if I could have.
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.