Posted October 17, 20178 yr I have a capability that I'm attaching to all items. There are a couple of values that I would like to sync to the client, however since I am attaching this capability to all items I can't override onUpdate or getNBTShareTag to do the syncing. How can I do this, or is it even possible?
October 19, 20178 yr I explained how to sync item capabilities here: Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
October 19, 20178 yr When using the nbt share tag, I am sometimes nervous about whether it is synced right away because I think the share nbt is mostly updated on an inventory change -- like if you pick something up, switch item in your hands and such. So for good measure, assuming the item in question is the one being held I usually have the server send the held item update packet: Quote if (player instanceof EntityPlayerMP) { ((EntityPlayerMP) player).connection.sendPacket(new SPacketHeldItemChange(player.inventory.currentItem)); } Check out my tutorials here: http://jabelarminecraft.blogspot.com/
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.