use of kingdoms.server.handlers.packets.server.SPacketAdd in project Tale-of-Kingdoms by Ivasik78.
the class GuiFoodKeeper method actionPerformed.
@Override
public void actionPerformed(GuiButton button) {
switch(button.id) {
case 1:
if (this.freeBread) {
this.mc.displayGuiScreen(null);
NetworkHandler.INSTANCE.sendToServer(new SPacketAdd(new ItemStack(Items.bread), 1, "gui.farmer.take"));
this.freeBread = false;
} else if (!this.world.isRemote) {
this.player.addChatMessage(new ChatComponentTranslation("gui.farmer.have"));
}
break;
case 2:
this.mc.displayGuiScreen(null);
break;
}
}
use of kingdoms.server.handlers.packets.server.SPacketAdd in project Tale-of-Kingdoms by Ivasik78.
the class GuiFisher method actionPerformed.
@Override
public void actionPerformed(final GuiButton guibutton) {
if (guibutton.id == 1) {
this.mc.displayGuiScreen(null);
NetworkHandler.INSTANCE.sendToServer(new SPacketAdd(new ItemStack(Items.fishing_rod), 1, "npc.fisher.dialog.fishingRod"));
} else if (guibutton.id == 2) {
this.mc.displayGuiScreen(null);
}
}
Aggregations