Fix bug #29
This commit is contained in:
@@ -79,7 +79,7 @@ public abstract class BlockBase extends Block {
|
||||
public boolean rotateBlock(World world, BlockPos pos, EnumFacing axis) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
|
||||
if (tile instanceof TileBase) {
|
||||
if (!world.isRemote && tile instanceof TileBase) {
|
||||
EnumFacing dir = ((TileBase) tile).getDirection();
|
||||
|
||||
int newDir = dir.ordinal() + 1;
|
||||
@@ -90,7 +90,7 @@ public abstract class BlockBase extends Block {
|
||||
|
||||
((TileBase) tile).setDirection(EnumFacing.getFront(newDir));
|
||||
|
||||
RefinedStorageUtils.reRenderBlock(world, pos);
|
||||
world.notifyBlockUpdate(pos, world.getBlockState(pos), world.getBlockState(pos), 8);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import net.minecraft.util.ITickable;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import refinedstorage.RefinedStorage;
|
||||
import refinedstorage.RefinedStorageUtils;
|
||||
import refinedstorage.network.MessageTileContainerUpdate;
|
||||
|
||||
public abstract class TileBase extends TileEntity implements ITickable {
|
||||
@@ -75,6 +76,8 @@ public abstract class TileBase extends TileEntity implements ITickable {
|
||||
@Override
|
||||
public void onDataPacket(NetworkManager net, SPacketUpdateTileEntity packet) {
|
||||
direction = EnumFacing.getFront(packet.getNbtCompound().getInteger(NBT_DIRECTION));
|
||||
|
||||
RefinedStorageUtils.reRenderBlock(worldObj, pos);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user