Search in sources :

Example 11 with AWGuiContainerBase

use of com.codetaylor.mc.artisanworktables.modules.worktables.gui.AWGuiContainerBase in project artisan-worktables by codetaylor.

the class GuiElementButtonOredictLink 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.setOredictLinked(!tileEntity.isOreDictLinked());
}
Also used : AWGuiContainerBase(com.codetaylor.mc.artisanworktables.modules.worktables.gui.AWGuiContainerBase) TileEntityBase(com.codetaylor.mc.artisanworktables.modules.worktables.tile.spi.TileEntityBase)

Example 12 with AWGuiContainerBase

use of com.codetaylor.mc.artisanworktables.modules.worktables.gui.AWGuiContainerBase in project artisan-worktables by codetaylor.

the class GuiElementButtonOredictLink method tooltipTextGet.

@Override
public List<String> tooltipTextGet(List<String> tooltip) {
    AWGuiContainerBase gui = (AWGuiContainerBase) this.guiBase;
    TileEntityBase tileEntity = gui.getTileEntity();
    if (tileEntity.isOreDictLinked()) {
        tooltip.add(I18n.translateToLocal("gui.artisanworktables.tooltip.button.oredict.linked"));
    } else {
        tooltip.add(I18n.translateToLocal("gui.artisanworktables.tooltip.button.oredict.unlinked"));
    }
    return tooltip;
}
Also used : AWGuiContainerBase(com.codetaylor.mc.artisanworktables.modules.worktables.gui.AWGuiContainerBase) TileEntityBase(com.codetaylor.mc.artisanworktables.modules.worktables.tile.spi.TileEntityBase)

Example 13 with AWGuiContainerBase

use of com.codetaylor.mc.artisanworktables.modules.worktables.gui.AWGuiContainerBase in project artisan-worktables by codetaylor.

the class GuiElementButtonLocked method isLocked.

public boolean isLocked() {
    AWGuiContainerBase gui = (AWGuiContainerBase) this.guiBase;
    TileEntityBase tileEntity = gui.getTileEntity();
    return tileEntity.isLocked();
}
Also used : AWGuiContainerBase(com.codetaylor.mc.artisanworktables.modules.worktables.gui.AWGuiContainerBase) TileEntityBase(com.codetaylor.mc.artisanworktables.modules.worktables.tile.spi.TileEntityBase)

Example 14 with AWGuiContainerBase

use of com.codetaylor.mc.artisanworktables.modules.worktables.gui.AWGuiContainerBase 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)

Example 15 with AWGuiContainerBase

use of com.codetaylor.mc.artisanworktables.modules.worktables.gui.AWGuiContainerBase in project artisan-worktables by codetaylor.

the class GuiElementButtonExportShaped method elementIsVisible.

@Override
public boolean elementIsVisible(int mouseX, int mouseY) {
    AWGuiContainerBase gui = (AWGuiContainerBase) this.guiBase;
    TileEntityBase tileEntity = gui.getTileEntity();
    return tileEntity.isCreative();
}
Also used : AWGuiContainerBase(com.codetaylor.mc.artisanworktables.modules.worktables.gui.AWGuiContainerBase) TileEntityBase(com.codetaylor.mc.artisanworktables.modules.worktables.tile.spi.TileEntityBase)

Aggregations

AWGuiContainerBase (com.codetaylor.mc.artisanworktables.modules.worktables.gui.AWGuiContainerBase)17 TileEntityBase (com.codetaylor.mc.artisanworktables.modules.worktables.tile.spi.TileEntityBase)17 Clipboard (java.awt.datatransfer.Clipboard)2 StringSelection (java.awt.datatransfer.StringSelection)2 TextComponentTranslation (net.minecraft.util.text.TextComponentTranslation)2 CSPacketWorktableClear (com.codetaylor.mc.artisanworktables.modules.worktables.network.CSPacketWorktableClear)1 CSPacketWorktableCreativeToggle (com.codetaylor.mc.artisanworktables.modules.worktables.network.CSPacketWorktableCreativeToggle)1 CSPacketWorktableLockedModeToggle (com.codetaylor.mc.artisanworktables.modules.worktables.network.CSPacketWorktableLockedModeToggle)1