use of net.glowstone.block.ItemTable in project Glowstone by GlowstoneMC.
the class BlockButton method extraUpdate.
private void extraUpdate(GlowBlock block) {
Button button = (Button) block.getState().getData();
ItemTable itemTable = ItemTable.instance();
GlowBlock target = block.getRelative(button.getAttachedFace());
if (target.getType().isSolid()) {
for (BlockFace face2 : ADJACENT) {
GlowBlock target2 = target.getRelative(face2);
BlockType notifyType = itemTable.getBlock(target2.getTypeId());
if (notifyType != null) {
if (target2.getFace(block) == null) {
notifyType.onNearBlockChanged(target2, BlockFace.SELF, block, block.getType(), block.getData(), block.getType(), block.getData());
}
notifyType.onRedstoneUpdate(target2);
}
}
}
}
use of net.glowstone.block.ItemTable in project Glowstone by GlowstoneMC.
the class BlockRedstone method extraUpdate.
private void extraUpdate(GlowBlock block) {
ItemTable itemTable = ItemTable.instance();
for (BlockFace face : calculateConnections(block)) {
GlowBlock target = block.getRelative(face);
if (target.getType().isSolid()) {
for (BlockFace face2 : ADJACENT) {
GlowBlock target2 = target.getRelative(face2);
BlockType notifyType = itemTable.getBlock(target2.getTypeId());
if (notifyType != null) {
if (target2.getFace(block) == null) {
notifyType.onNearBlockChanged(target2, BlockFace.SELF, block, block.getType(), block.getData(), block.getType(), block.getData());
}
notifyType.onRedstoneUpdate(target2);
}
}
}
}
}
Aggregations