use of net.minecraft.server.v1_13_R1.PacketPlayOutSetSlot in project PublicCrafters by BananaPuncher714.
the class CustomContainerWorkbench method setCraftResult.
public void setCraftResult() {
CraftingManager.getInstance().lastCraftView = getBukkitView();
ItemStack craftResult = CraftingManager.getInstance().craft(craftInventory, world);
resultInventory.setItem(0, craftResult);
if (listeners.isEmpty()) {
return;
}
if ((craftResult != null) && (craftResult.getItem() == Items.FILLED_MAP)) {
return;
}
for (Object listener : listeners) {
EntityPlayer player = (EntityPlayer) listener;
player.playerConnection.sendPacket(new PacketPlayOutSetSlot(player.activeContainer.windowId, 0, craftResult));
}
}
use of net.minecraft.server.v1_13_R1.PacketPlayOutSetSlot in project PublicCrafters by BananaPuncher714.
the class CustomContainerWorkbench method setCraftResult.
public void setCraftResult() {
CraftingManager.getInstance().lastCraftView = getBukkitView();
ItemStack craftResult = CraftingManager.getInstance().craft(craftInventory, world);
resultInventory.setItem(0, craftResult);
if (listeners.isEmpty()) {
return;
}
if ((craftResult != null) && (craftResult.getItem() == Items.FILLED_MAP)) {
return;
}
for (Object listener : listeners) {
EntityPlayer player = (EntityPlayer) listener;
player.playerConnection.sendPacket(new PacketPlayOutSetSlot(player.activeContainer.windowId, 0, craftResult));
}
}
Aggregations