Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @SubscribeEvent
- public void onBlockUpdate(BlockEvent.NeighborNotifyEvent event)
- {
- for (EnumFacing f : EnumFacing.VALUES)
- {
- BlockPos pos = event.getPos().offset(f);
- IBlockState state = event.getWorld().getBlockState(pos);
- if ((state.getBlock() == this) && (state.getValue(FACING) == event.getState().getValue(FACING)))
- {
- event.getWorld().setBlockState(pos, state.withProperty(OPEN, event.getState().getValue(OPEN)));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment