private boolean neighborNotifyEvent(World world, @Nonnull BlockPos pos, @Nullable IBlockState state, EnumSet<EnumFacing> dirs) { return ForgeEventFactory.onNeighborNotify(world, pos, state == null ? world.getBlockState(pos) : state, dirs, false).isCanceled(); }
protected void notifyNeighbors(World worldIn, BlockPos pos, IBlockState state) { EnumFacing enumfacing = (EnumFacing)state.getValue(FACING); BlockPos blockpos = pos.offset(enumfacing.getOpposite()); if(ForgeEventFactory.onNeighborNotify(worldIn, pos, worldIn.getBlockState(pos), EnumSet.of(enumfacing.getOpposite()), false).isCanceled()) return; worldIn.neighborChanged(blockpos, this, pos); worldIn.notifyNeighborsOfStateExcept(blockpos, this, enumfacing); }
tracker.start("ForgeEventFactory.onNeighborNotify() at " + pos); boolean canceled = ForgeEventFactory.onNeighborNotify(world, pos, bs, sidesToNotify, false).isCanceled(); tracker.stop();