Guest User

Untitled

a guest
Dec 17th, 2016
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @Override
  2.     public void neighborChanged(IBlockState state, World worldIn, BlockPos pos,
  3.             Block blockIn, BlockPos fromPos) {
  4.         IBlockState neighbor = worldIn.getBlockState(fromPos);
  5.         if (neighbor.getBlock() instanceof BlockBlinds && neighbor.getValue(FACING) == state.getValue(FACING)) {
  6.             if (neighbor.getValue(OPEN) != state.getValue(OPEN)) {
  7.                 worldIn.setBlockState(pos, state.withProperty(OPEN, neighbor.getValue(OPEN)));
  8.             }
  9.         }
  10.     }
Advertisement
Add Comment
Please, Sign In to add comment