Added monitor rotation

This commit is contained in:
LemADEC 2016-01-14 02:13:26 +01:00
parent 5b2a02f6b7
commit 120d8f5d21

View file

@ -12,6 +12,7 @@ import net.minecraft.util.IIcon;
import net.minecraft.util.StatCollector;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import cr0s.warpdrive.WarpDrive;
import cr0s.warpdrive.data.CameraRegistryItem;
import cr0s.warpdrive.render.ClientCameraHandler;
@ -77,6 +78,12 @@ public class BlockMonitor extends BlockContainer {
}
}
@Override
public boolean rotateBlock(World world, int x, int y, int z, ForgeDirection axis) {
world.setBlockMetadataWithNotify(x, y, z, axis.ordinal(), 3);
return true;
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer entityPlayer, int side, float hitX, float hitY, float hitZ) {
// Monitor is only reacting client side