@Override
public boolean rotateBlock(World world, EntityPlayer player, int x, int y, int z, ForgeDirection face){
TileEntity te = world.getTileEntity(x, y, z);
if(te instanceof TileEntityOmnidirectionalHopper) {
TileEntityOmnidirectionalHopper teOh = (TileEntityOmnidirectionalHopper)te;
if(player != null && player.isSneaking()) {
int newMeta = (world.getBlockMetadata(x, y, z) + 1) % 6;
if(newMeta == teOh.getDirection().ordinal()) newMeta = (newMeta + 1) % 6;
world.setBlockMetadataWithNotify(x, y, z, newMeta, 3);
} else {
int newRotation = (teOh.getDirection().ordinal() + 1) % 6;
if(newRotation == world.getBlockMetadata(x, y, z)) newRotation = (newRotation + 1) % 6;
teOh.setDirection(ForgeDirection.getOrientation(newRotation));
teOh.sendDescriptionPacket();
}
return true;
}
return false;
}