World world = ... // get the world object BlockPos pos = new BlockPos(x, y, z); // the location of the changed block world.notifyBlocksOfNeighborChange(pos, world.getBlockState(pos).getBlock());
@SubscribeEvent public void onBlockBreak(BlockEvent.BreakEvent event) { World world = event.getWorld(); BlockPos pos = event.getPos(); world.notifyBlocksOfNeighborChange(pos, world.getBlockState(pos).getBlock()); }Package Library: The net.minecraft.world package is part of the Minecraft game library, which provides a set of Java APIs for mod developers to add new features to the game. The World class is one of the core classes in this library and is located in the net.minecraft.world package.