Cleaned up a little bit
Removed some useless privates from TileEntityDimDoor Added some useful privates to DDTileEntityBase
This commit is contained in:
parent
b68463fc62
commit
aac1108056
2 changed files with 9 additions and 10 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue