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,7 +56,11 @@ public abstract class TileMachineBase extends TileEntity {
@Override
public void readFromNBT(NBTTagCompound tagCompound) {
super.readFromNBT(tagCompound);
rotation = tagCompound.getInteger("rotation");
if(tagCompound.hasKey("meta") && !tagCompound.hasKey("rotation")){
rotation = tagCompound.getInteger("meta");
} else {
rotation = tagCompound.getInteger("rotation");
}
}
@Override