added backwards compatibility for block rotation

This commit is contained in:
modmuss50 2015-09-19 09:38:19 +01:00
parent 148715111f
commit 47a8ccadcb

View file

@ -56,8 +56,12 @@ public abstract class TileMachineBase extends TileEntity {
@Override @Override
public void readFromNBT(NBTTagCompound tagCompound) { public void readFromNBT(NBTTagCompound tagCompound) {
super.readFromNBT(tagCompound); super.readFromNBT(tagCompound);
if(tagCompound.hasKey("meta") && !tagCompound.hasKey("rotation")){
rotation = tagCompound.getInteger("meta");
} else {
rotation = tagCompound.getInteger("rotation"); rotation = tagCompound.getInteger("rotation");
} }
}
@Override @Override
public void writeToNBT(NBTTagCompound tagCompound) { public void writeToNBT(NBTTagCompound tagCompound) {