Search in sources :

Example 1 with AWGuiContainerBase

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

the class GuiElementButtonClearAll 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)

Example 2 with AWGuiContainerBase

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

the class GuiElementButtonExportShapeless 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)

Example 3 with AWGuiContainerBase

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

the class GuiElementButtonLocked 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)

Example 4 with AWGuiContainerBase

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

the class GuiElementButtonLocked 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();
    ModuleWorktables.PACKET_SERVICE.sendToServer(new CSPacketWorktableLockedModeToggle(tileEntity.getPos()));
}
Also used : AWGuiContainerBase(com.codetaylor.mc.artisanworktables.modules.worktables.gui.AWGuiContainerBase) CSPacketWorktableLockedModeToggle(com.codetaylor.mc.artisanworktables.modules.worktables.network.CSPacketWorktableLockedModeToggle) TileEntityBase(com.codetaylor.mc.artisanworktables.modules.worktables.tile.spi.TileEntityBase)

Example 5 with AWGuiContainerBase

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

the class GuiElementButtonLocked method tooltipTextGet.

@Override
public List<String> tooltipTextGet(List<String> tooltip) {
    AWGuiContainerBase gui = (AWGuiContainerBase) this.guiBase;
    TileEntityBase tileEntity = gui.getTileEntity();
    if (tileEntity.isLocked()) {
        tooltip.add(I18n.translateToLocal("gui.artisanworktables.tooltip.button.locked.enabled"));
    } else {
        tooltip.add(I18n.translateToLocal("gui.artisanworktables.tooltip.button.locked.disabled"));
    }
    return tooltip;
}
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