diff options
author | Alkalus <draknyte1@hotmail.com> | 2017-09-28 12:52:31 +1000 |
---|---|---|
committer | Alkalus <draknyte1@hotmail.com> | 2017-09-28 12:52:31 +1000 |
commit | 19749c79884682301e292b52d0ddb15e6d35a580 (patch) | |
tree | d34cc6f5ffe3aebb2354761ca9a9e2a53b853b38 /src/Java/gtPlusPlus/core/gui/machine | |
parent | 4ab32e96512efaccb63fc2024e44dbc675afc5f0 (diff) | |
download | GT5-Unofficial-19749c79884682301e292b52d0ddb15e6d35a580.tar.gz GT5-Unofficial-19749c79884682301e292b52d0ddb15e6d35a580.tar.bz2 GT5-Unofficial-19749c79884682301e292b52d0ddb15e6d35a580.zip |
+ Added Base Tile Entity Class.
% Changed Trade Table to inherit from the base class.
+ Added functionality to the base TE to store the owners name and UUID.
+ Added Base NBT Block Class.
$ Fixed ItemBlockNBT handling of NBT.
Diffstat (limited to 'src/Java/gtPlusPlus/core/gui/machine')
-rw-r--r-- | src/Java/gtPlusPlus/core/gui/machine/GUI_TradeTable.java | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_TradeTable.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_TradeTable.java index 70bfed3be3..93444a7a23 100644 --- a/src/Java/gtPlusPlus/core/gui/machine/GUI_TradeTable.java +++ b/src/Java/gtPlusPlus/core/gui/machine/GUI_TradeTable.java @@ -4,29 +4,45 @@ import org.lwjgl.opengl.GL11; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.container.Container_ProjectTable; import gtPlusPlus.core.container.Container_TradeTable; -import gtPlusPlus.core.container.Container_Workbench; import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.machines.TileEntityProjectTable; import gtPlusPlus.core.tileentities.machines.TileEntityTradeTable; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench; import gtPlusPlus.core.util.Utils; -import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; @SideOnly(Side.CLIENT) public class GUI_TradeTable extends GuiContainer { + + TileEntityTradeTable mThisTable; + final String mOwnerName; private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/ProjectTable.png"); - public GUI_TradeTable(final InventoryPlayer player_inventory, final TileEntityTradeTable te){ + public GUI_TradeTable(final InventoryPlayer player_inventory, final TileEntityTradeTable te, final String mOwnerName){ super(new Container_TradeTable(player_inventory, te)); + + if (te == null){ + this.mThisTable = null; + this.mOwnerName = mOwnerName; + Utils.LOG_INFO("Set invalid TE in GUI"); + } + else { + mThisTable = te; + this.mOwnerName = mOwnerName; + Utils.LOG_INFO("Set valid TE in GUI"); + } } @Override + protected void drawGuiContainerForegroundLayer(final int i, final int j){ + this.fontRendererObj.drawString(I18n.format("Owner: "+this.mOwnerName, new Object[0]), 28, 6, 4210752); + //this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); + } + + @Override protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); this.mc.renderEngine.bindTexture(craftingTableGuiTextures); |