use of com.codetaylor.mc.artisanworktables.modules.worktables.gui.AWGuiContainerBase in project artisan-worktables by codetaylor.
the class GuiElementButtonExportShaped 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, true);
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 GuiElementButtonCreative method isCreative.
private boolean isCreative() {
AWGuiContainerBase gui = (AWGuiContainerBase) this.guiBase;
TileEntityBase tileEntity = gui.getTileEntity();
return !tileEntity.isCreative();
}
Aggregations