Search in sources :

Example 1 with CSPacketWorktableClear

use of com.codetaylor.mc.artisanworktables.modules.worktables.network.CSPacketWorktableClear in project artisan-worktables by codetaylor.

the class GuiElementButtonClearAll method elementClicked.

@Override
public void elementClicked(int mouseX, int mouseY, int mouseButton) {
    super.elementClicked(mouseX, mouseY, mouseButton);
    AWGuiContainerBase gui = (AWGuiContainerBase) this.guiBase;
    TileEntityBase tileEntity = gui.getTileEntity();
    tileEntity.oreDictMap.clearMap();
    ModuleWorktables.PACKET_SERVICE.sendToServer(new CSPacketWorktableClear(tileEntity.getPos(), CSPacketWorktableClear.CLEAR_ALL));
}
Also used : AWGuiContainerBase(com.codetaylor.mc.artisanworktables.modules.worktables.gui.AWGuiContainerBase) TileEntityBase(com.codetaylor.mc.artisanworktables.modules.worktables.tile.spi.TileEntityBase) CSPacketWorktableClear(com.codetaylor.mc.artisanworktables.modules.worktables.network.CSPacketWorktableClear)

Aggregations

AWGuiContainerBase (com.codetaylor.mc.artisanworktables.modules.worktables.gui.AWGuiContainerBase)1 CSPacketWorktableClear (com.codetaylor.mc.artisanworktables.modules.worktables.network.CSPacketWorktableClear)1 TileEntityBase (com.codetaylor.mc.artisanworktables.modules.worktables.tile.spi.TileEntityBase)1