From 19894ecb9d0a8bcb5fec9117ec705b4c93ccdcb3 Mon Sep 17 00:00:00 2001 From: Draknyte1 Date: Sun, 20 Mar 2016 13:41:05 +1000 Subject: Added an extra instanceof check in the XEventHandler class just incase the meta tile entity is actually a pipe. (Oversight at my behalf) Cleaned up some of te Player Caching code, so it's not loaded twice every time it's needed (6am logic loops are the cause) Will add a new build when I've finalised everything. --- src/Java/miscutil/gregtech/gui/GUI_SafeBlock.java | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'src/Java/miscutil/gregtech/gui/GUI_SafeBlock.java') diff --git a/src/Java/miscutil/gregtech/gui/GUI_SafeBlock.java b/src/Java/miscutil/gregtech/gui/GUI_SafeBlock.java index c4b2d540ba..94219dae0e 100644 --- a/src/Java/miscutil/gregtech/gui/GUI_SafeBlock.java +++ b/src/Java/miscutil/gregtech/gui/GUI_SafeBlock.java @@ -12,15 +12,29 @@ public class GUI_SafeBlock super(new CONTAINER_SafeBlock(aInventoryPlayer, aTileEntity), CORE.MODID + ":" + "textures/gui/" + "SafeBlock.png"); } - String UUID = ((CONTAINER_SafeBlock)this.mContainer).UUID; + String UUID = ((CONTAINER_SafeBlock)this.mContainer).ownerUUID; + boolean blockStatus = ((CONTAINER_SafeBlock)this.mContainer).blockStatus; private String tempPlayer = PlayerCache.lookupPlayerByUUID(UUID); @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { - this.fontRendererObj.drawString("Safe", 64, 64, 4210752); + + UUID = ((CONTAINER_SafeBlock)this.mContainer).ownerUUID; + blockStatus = ((CONTAINER_SafeBlock)this.mContainer).blockStatus; + tempPlayer = PlayerCache.lookupPlayerByUUID(UUID); + + if (blockStatus){ + this.fontRendererObj.drawString("Safe Status: Locked", 64, 62, 4210752); + } + else { + this.fontRendererObj.drawString("Safe Status: Unlocked", 64, 62, 4210752); + } + + this.fontRendererObj.drawString("Owner: "+ tempPlayer, 64, 72, 4210752); + if (!CORE.DEBUG){ - this.fontRendererObj.drawString("Owner: "+ tempPlayer, 120, 80, 4210752); + } } -- cgit