From aac1108056bd0d00d3f5880d2af2ccd69bd9a657 Mon Sep 17 00:00:00 2001 From: Mathijs Riezebos Date: Fri, 20 Jan 2017 15:20:36 +0100 Subject: [PATCH] Cleaned up a little bit Removed some useless privates from TileEntityDimDoor Added some useful privates to DDTileEntityBase --- .../dimdoors/tileentities/DDTileEntityBase.java | 6 ++++++ .../dimdoors/tileentities/TileEntityDimDoor.java | 13 +++---------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/zixiken/dimdoors/tileentities/DDTileEntityBase.java b/src/main/java/com/zixiken/dimdoors/tileentities/DDTileEntityBase.java index 7168351b..cf64011c 100644 --- a/src/main/java/com/zixiken/dimdoors/tileentities/DDTileEntityBase.java +++ b/src/main/java/com/zixiken/dimdoors/tileentities/DDTileEntityBase.java @@ -16,6 +16,8 @@ public abstract class DDTileEntityBase extends TileEntity { private boolean isPaired = false; private int riftID = -1; //should not start at 0 private int pairedRiftID = -1; + private boolean isInPocket = false; + private int pocketID = -1; /** * @@ -66,6 +68,8 @@ public abstract class DDTileEntityBase extends TileEntity { this.isPaired = nbt.getBoolean("isPaired"); this.riftID = nbt.getInteger("riftID"); this.pairedRiftID = nbt.getInteger("pairedRiftID"); + this.isInPocket = nbt.getBoolean("isInPocket"); + this.pocketID = nbt.getInteger("pocketID"); } catch (Exception e) { } } @@ -76,6 +80,8 @@ public abstract class DDTileEntityBase extends TileEntity { nbt.setBoolean("isPaired", this.isPaired); nbt.setInteger("riftID", this.riftID); nbt.setInteger("pairedRiftID", this.pairedRiftID); + nbt.setBoolean("isInPocket", this.isInPocket); + nbt.setInteger("pocketID", this.pocketID); return nbt; } diff --git a/src/main/java/com/zixiken/dimdoors/tileentities/TileEntityDimDoor.java b/src/main/java/com/zixiken/dimdoors/tileentities/TileEntityDimDoor.java index 198341f4..3d428cb6 100644 --- a/src/main/java/com/zixiken/dimdoors/tileentities/TileEntityDimDoor.java +++ b/src/main/java/com/zixiken/dimdoors/tileentities/TileEntityDimDoor.java @@ -11,11 +11,8 @@ public class TileEntityDimDoor extends DDTileEntityBase { public boolean doorIsOpen = false; public EnumFacing orientation = EnumFacing.SOUTH; - public boolean hasExit = false; public byte lockStatus = 1; - public boolean isDungeonChainLink = false; - public boolean hasGennedPair = false; - + @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); @@ -23,9 +20,7 @@ public class TileEntityDimDoor extends DDTileEntityBase { try { this.doorIsOpen = nbt.getBoolean("doorIsOpen"); this.orientation = EnumFacing.getFront(nbt.getInteger("orientation")); - this.hasExit = nbt.getBoolean("hasExit"); - this.isDungeonChainLink = nbt.getBoolean("isDungeonChainLink"); - this.hasGennedPair = nbt.getBoolean("hasGennedPair"); + this.lockStatus = nbt.getByte("lockStatus"); } catch (Exception e) { } } @@ -35,10 +30,8 @@ public class TileEntityDimDoor extends DDTileEntityBase { super.writeToNBT(nbt); nbt.setBoolean("doorIsOpen", this.doorIsOpen); - nbt.setBoolean("hasExit", this.hasExit); nbt.setInteger("orientation", this.orientation.getIndex()); - nbt.setBoolean("isDungeonChainLink", isDungeonChainLink); - nbt.setBoolean("hasGennedPair", hasGennedPair); + nbt.setByte("lockStatus", lockStatus); return nbt; }