Created
December 26, 2013 16:05
-
-
Save marvin-roesch/8135451 to your computer and use it in GitHub Desktop.
Connection checking example
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
@Override | |
public void onNeighborBlockChange(World world, int x, int y, int z, int newId) { | |
for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) { | |
if (world.getBlockTileEntity(x + side.offsetX, y + side.offsetY, z + side.offsetZ) instanceof TileCable) { | |
TileCable tile = (TileCable) world.getBlockTileEntity(x + side.offsetX, y + side.offsetY, z + side.offsetZ); | |
tile.checkConnections(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment