DimDoors/StevenDimDoors/mod_pocketDim/TileEntityDimRail.java

69 lines
1 KiB
Java
Raw Normal View History

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