Search in sources :

Example 6 with PacketPlayOutSetSlot

use of net.minecraft.network.protocol.game.PacketPlayOutSetSlot in project wordle by HypoxTeam.

the class PacketHandler1_17_1_R0_1 method setFakeItem.

@Override
public void setFakeItem(Player player, byte windowID, int slot, ItemStack item) {
    CraftPlayer craftPlayer = (CraftPlayer) player;
    EntityPlayer entityHuman = craftPlayer.getHandle();
    PacketPlayOutSetSlot packet = new PacketPlayOutSetSlot(windowID, entityHuman.bV.getStateId(), slot, CraftItemStack.asNMSCopy(item));
    entityHuman.b.sendPacket(packet);
}
Also used : EntityPlayer(net.minecraft.server.level.EntityPlayer) CraftPlayer(org.bukkit.craftbukkit.v1_17_R1.entity.CraftPlayer) PacketPlayOutSetSlot(net.minecraft.network.protocol.game.PacketPlayOutSetSlot)

Aggregations

PacketPlayOutSetSlot (net.minecraft.network.protocol.game.PacketPlayOutSetSlot)6 INbtTagCompound (com.ruinscraft.panilla.api.nbt.INbtTagCompound)3 Field (java.lang.reflect.Field)3 EntityPlayer (net.minecraft.server.level.EntityPlayer)3 ItemStack (net.minecraft.world.item.ItemStack)3 NbtTagCompound (com.ruinscraft.panilla.craftbukkit.v1_17_R1.nbt.NbtTagCompound)1 NbtTagCompound (com.ruinscraft.panilla.craftbukkit.v1_18_R1.nbt.NbtTagCompound)1 NbtTagCompound (com.ruinscraft.panilla.craftbukkit.v1_18_R2.nbt.NbtTagCompound)1 CraftPlayer (org.bukkit.craftbukkit.v1_17_R1.entity.CraftPlayer)1 CraftPlayer (org.bukkit.craftbukkit.v1_18_R1.entity.CraftPlayer)1 CraftPlayer (org.bukkit.craftbukkit.v1_18_R2.entity.CraftPlayer)1