Solved Fake items in inventory

Discussion in 'Plugin Development' started by Rixterz, Apr 25, 2017.

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

    Rixterz

    Hi,

    Just as you can send a packet to the client saying a block is a different type, and when they right-click it, it updates, is that possible with an item in their inventory? For example, the server would place a bow in the player's inventory and send a packet saying it's a stick, then it would render as a stick until updated in some way.

    Thanks,

    Rix
     
  2. Offline

    Zombie_Striker

    @Rixterz
    Yes.
    http://wiki.vg/Protocol#Set_Slot

    Set the window byte to be 0 (for the player's inventory), set the short to be equal to the slot of the bow, and then provide the item you which to 'add' (it shows the json file, but minecraft should already have a wrapper for this.)
     
    Rixterz likes this.
  3. Offline

    Rixterz

    Excellent, thanks!
     
Thread Status:
Not open for further replies.

Share This Page