Posted September 7, 201510 yr Hey folks, I have an item that I store inside an inventory of my IEEP. I need to have that item synchronized at all time because I am calculating values for custom gui rendering from its durabilty. The problem is that right now it is only synchronized when I open the container where I use this item. How can I force this item to update , I could use a custom packet but I feel like minecraft must have a built in way I dont know about. Greetz Failender
September 7, 201510 yr I was sure that item updates occurred on both Client and Server. Anyways, if you're trying to do what I think you're trying to do, you can always subscribe to LivingUpdateEvent and manually call the update. I found that IEEP doesn't always have the same values on client as server. (Maybe it does, and I'm just not using it correctly) But when my player first joins the world, I sync them once, and updates run on both sides. With all due respect, sir: I do, what I do, the way I do it. ~ MacGyver
September 7, 201510 yr Author I am damaging the items on server side (they are a energy storage and im usign damage values to check out how much energy is left) . I am rendering the energy left on client side which means I need the damage value on client side. But its not getting synced by default, because its not in a opened container. Which means I need to force the update. The question is not the where, the question is the how. So my question is has vanilla a built in way to synchronize itemstacks I can use.
September 7, 201510 yr If I remember when an item receive a "damage change" it normally autosync client and server (normally in mc methods who return an itemstack). But I can't imagine what you want without looking the item class or something more (GUI images, Container, ... ). "Probably" you are applying something much complicated without necessity. =/ // In my mod generally, when I start to make an idea of item or system, I look for something similar on Minecraft and try to make a "near concept" to after make the system like I planned. // BSc CIS, hardcore gamer and a big fan of Minecraft. TmzOS ::..
September 7, 201510 yr Author Exactly. It does that using detectAndSendChanges. So. Is there a good way without detectAndSendChanges? I could of course also use a custom packet, but I feel like there must be another way
September 7, 201510 yr Author Yeah I wasnt sure about that, hoped there was a better way. Thank you sir
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.