DimDoors/StevenDimDoors/mod_pocketDim/tileentities/TileEntityDimDoor.java

58 lines
1.3 KiB
Java
Raw Normal View History

package StevenDimDoors.mod_pocketDim.tileentities;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
public class TileEntityDimDoor extends TileEntity
{
public boolean openOrClosed;
public int orientation;
public boolean hasExit;
public boolean isDungeonChainLink;
public boolean hasGennedPair=false;
@Override
public boolean canUpdate()
{
return false;
}
@Override
public void updateEntity() { }
@Override
public void readFromNBT(NBTTagCompound nbt)
{
super.readFromNBT(nbt);
@SuppressWarnings("unused") // ???
int i = nbt.getInteger(("Size"));
try
{
this.openOrClosed = nbt.getBoolean("openOrClosed");
this.orientation = nbt.getInteger("orientation");
this.hasExit = nbt.getBoolean("hasExit");
this.isDungeonChainLink = nbt.getBoolean("isDungeonChainLink");
this.hasGennedPair = nbt.getBoolean("hasGennedPair");
}
catch (Exception e) // ???
{
}
}
@Override
public void writeToNBT(NBTTagCompound nbt)
{
@SuppressWarnings("unused") // ?????
int i = 0;
super.writeToNBT(nbt);
nbt.setBoolean("openOrClosed", this.openOrClosed);
nbt.setBoolean("hasExit", this.hasExit);
nbt.setInteger("orientation", this.orientation);
nbt.setBoolean("isDungeonChainLink", isDungeonChainLink);
nbt.setBoolean("hasGennedPair", hasGennedPair);
}
}