Send block or entity update?

Discussion in 'Plugin Development' started by Jayjay110, May 27, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Jayjay110

    If I change something on the server, how could I make it so the client can see it, I spawned an item, changed its type and its the same, I want to change it how? (Unloading and reloading the chunk doesnt work)
     
  2. Offline

    garbagemule

    There is a good chance that the object you're changing is actually not the object you think it is. What kind of item are you spawning, and why are you changing it right after spawning it, instead of just spawning the right thing to begin with? More information, and throw some code in there as well to clarify :)
     
  3. Offline

    Jayjay110

    im using the world.dropItem() code to spawn the item, and Im changing it right after spawning because I want to animate it to look like it cycles through the different Items

    And to change it I use item.setType(Material.BLAH), when I pick it Up it is the Item I wanted but its image doesnt change when its on the floor
     
  4. Offline

    garbagemule

    Could you try disconnecting and reconnecting after dropping the item, to see if the item changes at reconnect? If it does, it's likely that you can't control it :(
     
  5. Offline

    Jayjay110

    yeh it does :(
     
  6. Offline

    garbagemule

    I'm not very packet-savvy, so I can't guide you with that, but have a look at the different types of packets there are, and if it is possible to send one that updates items on the ground.
     
    Jayjay110 likes this.
  7. Offline

    Jayjay110

    Thanks :)

    Well does anyone know how to use packets then?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
Thread Status:
Not open for further replies.

Share This Page