use of net.minecraft.network.protocol.game.PacketPlayInSetCreativeSlot in project Panilla by ds58.
the class PacketInspector method checkPacketPlayInSetCreativeSlot.
@Override
public void checkPacketPlayInSetCreativeSlot(Object _packet) throws NbtNotPermittedException {
if (_packet instanceof PacketPlayInSetCreativeSlot) {
PacketPlayInSetCreativeSlot packet = (PacketPlayInSetCreativeSlot) _packet;
int slot = packet.b();
ItemStack itemStack = packet.getItemStack();
if (itemStack == null || !itemStack.hasTag())
return;
NbtTagCompound tag = new NbtTagCompound(itemStack.getTag());
String itemClass = itemStack.getItem().getClass().getSimpleName();
String packetClass = packet.getClass().getSimpleName();
NbtChecks.checkPacketPlayIn(slot, tag, itemClass, packetClass, panilla);
}
}
use of net.minecraft.network.protocol.game.PacketPlayInSetCreativeSlot in project Panilla by ds58.
the class PacketInspector method checkPacketPlayInSetCreativeSlot.
@Override
public void checkPacketPlayInSetCreativeSlot(Object _packet) throws NbtNotPermittedException {
if (_packet instanceof PacketPlayInSetCreativeSlot) {
PacketPlayInSetCreativeSlot packet = (PacketPlayInSetCreativeSlot) _packet;
int slot = packet.b();
ItemStack itemStack = packet.c();
if (itemStack == null || !itemStack.r())
return;
NbtTagCompound tag = new NbtTagCompound(itemStack.s());
String itemClass = itemStack.c().getClass().getSimpleName();
String packetClass = packet.getClass().getSimpleName();
NbtChecks.checkPacketPlayIn(slot, tag, itemClass, packetClass, panilla);
}
}
use of net.minecraft.network.protocol.game.PacketPlayInSetCreativeSlot in project Panilla by ds58.
the class PacketInspector method checkPacketPlayInSetCreativeSlot.
@Override
public void checkPacketPlayInSetCreativeSlot(Object _packet) throws NbtNotPermittedException {
if (_packet instanceof PacketPlayInSetCreativeSlot) {
PacketPlayInSetCreativeSlot packet = (PacketPlayInSetCreativeSlot) _packet;
int slot = packet.b();
ItemStack itemStack = packet.c();
if (itemStack == null || !itemStack.s())
return;
NbtTagCompound tag = new NbtTagCompound(itemStack.t());
String itemClass = itemStack.c().getClass().getSimpleName();
String packetClass = packet.getClass().getSimpleName();
NbtChecks.checkPacketPlayIn(slot, tag, itemClass, packetClass, panilla);
}
}
Aggregations