use of com.codetaylor.mc.artisanworktables.modules.worktables.gui.AWGuiContainerBase in project artisan-worktables by codetaylor.
the class GuiElementButtonCreative 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 CSPacketWorktableCreativeToggle(tileEntity.getPos()));
}
use of com.codetaylor.mc.artisanworktables.modules.worktables.gui.AWGuiContainerBase in project artisan-worktables by codetaylor.
the class GuiElementButtonCreative method tooltipTextGet.
@Override
public List<String> tooltipTextGet(List<String> tooltip) {
AWGuiContainerBase gui = (AWGuiContainerBase) this.guiBase;
TileEntityBase tileEntity = gui.getTileEntity();
if (tileEntity.isCreative()) {
tooltip.add(I18n.translateToLocal("gui.artisanworktables.tooltip.button.creative.enabled"));
} else {
tooltip.add(I18n.translateToLocal("gui.artisanworktables.tooltip.button.creative.disabled"));
}
return tooltip;
}
use of com.codetaylor.mc.artisanworktables.modules.worktables.gui.AWGuiContainerBase in project artisan-worktables by codetaylor.
the class GuiElementButtonExportShapeless 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();
try {
String data = ZSRecipeExport.getExportString((AWContainer) gui.inventorySlots, tileEntity, false);
StringSelection contents = new StringSelection(data);
Toolkit defaultToolkit = Toolkit.getDefaultToolkit();
Clipboard systemClipboard = defaultToolkit.getSystemClipboard();
systemClipboard.setContents(contents, null);
Minecraft.getMinecraft().player.sendMessage(new TextComponentTranslation("chat.artisanworktables.message.recipe.copy.success"));
} catch (Exception e) {
Minecraft.getMinecraft().player.sendMessage(new TextComponentTranslation("chat.artisanworktables.message.recipe.copy.error"));
ModuleWorktables.LOG.error("", e);
}
}
use of com.codetaylor.mc.artisanworktables.modules.worktables.gui.AWGuiContainerBase in project artisan-worktables by codetaylor.
the class GuiElementButtonOredictLink method isOreDictLinked.
public boolean isOreDictLinked() {
AWGuiContainerBase gui = (AWGuiContainerBase) this.guiBase;
TileEntityBase tileEntity = gui.getTileEntity();
return tileEntity.isOreDictLinked();
}
use of com.codetaylor.mc.artisanworktables.modules.worktables.gui.AWGuiContainerBase in project artisan-worktables by codetaylor.
the class GuiElementButtonOredictLink method elementIsVisible.
@Override
public boolean elementIsVisible(int mouseX, int mouseY) {
AWGuiContainerBase gui = (AWGuiContainerBase) this.guiBase;
TileEntityBase tileEntity = gui.getTileEntity();
return tileEntity.isCreative();
}
Aggregations