Created
February 6, 2017 00:09
-
-
Save aikar/23f9e0404661ea44f400155c6fec666d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void c(final World world, final BlockPosition blockposition) { | |
HttpUtilities.a.submit(new Runnable() { | |
public void run() { | |
Chunk chunk = world.getChunkAtWorldCoords(blockposition); | |
for (int i = blockposition.getY() - 1; i >= 0; --i) { | |
final BlockPosition blockposition1 = new BlockPosition(blockposition.getX(), i, blockposition.getZ()); | |
if (!chunk.c(blockposition1)) { | |
break; | |
} | |
IBlockData iblockdata = world.getType(blockposition1); | |
if (iblockdata.getBlock() == Blocks.BEACON) { | |
((WorldServer) world).postToMainThread(new Runnable() { | |
public void run() { | |
TileEntity tileentity = world.getTileEntity(blockposition); | |
if (tileentity instanceof TileEntityBeacon) { | |
((TileEntityBeacon) tileentity).n(); | |
world.playBlockAction(blockposition, Blocks.BEACON, 1, 0); | |
} | |
} | |
}); | |
} | |
} | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment