Java Code Examples for net.minecraft.world.World.neighborChanged()

The following are Jave code examples for showing how to use neighborChanged() of the net.minecraft.world.World class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: Minecoprocessors   File: BlockMinecoprocessor.java   View Source Code Vote up 5 votes
protected void notifyNeighborsOnSide(World worldIn, BlockPos pos, EnumFacing side) {
  BlockPos neighborPos = pos.offset(side);
  if (net.minecraftforge.event.ForgeEventFactory.onNeighborNotify(worldIn, pos, worldIn.getBlockState(pos), java.util.EnumSet.of(side), false)
      .isCanceled()) {
    return;
  }
  worldIn.neighborChanged(neighborPos, this, pos);
  worldIn.notifyNeighborsOfStateExcept(neighborPos, this, side.getOpposite());
}