mirror of
https://github.com/GTNewHorizons/Draconic-Evolution.git
synced 2026-11-22 05:02:28 +00:00
Fixed Energy Pylon state update logic
This commit is contained in:
1 parent
02fb8145f8
commit
4a3e14e80e
1 file changed
+2
-1
+2
-1
@@ -83,7 +83,6 @@ public class EnergyPylon extends BlockDE { // todo fix sphere renderer
|
||||
}
|
||||
|
||||
private void updateBlockState(World world, int x, int y, int z) {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
int metadata = world.getBlockMetadata(x, y, z);
|
||||
if (metadata == 0) {
|
||||
if (world.getBlock(x, y + 1, z) == Blocks.glass) {
|
||||
@@ -96,12 +95,14 @@ public class EnergyPylon extends BlockDE { // todo fix sphere renderer
|
||||
world.setBlock(x, y - 1, z, ModBlocks.invisibleMultiblock, 2, 2);
|
||||
}
|
||||
} else {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if (!(tile instanceof TileEnergyPylon) || (metadata == 1 && isGlassMissing(world, x, y + 1, z))
|
||||
|| (metadata == 2 && isGlassMissing(world, x, y - 1, z))) {
|
||||
metadata = 0;
|
||||
world.setBlockMetadataWithNotify(x, y, z, metadata, 2);
|
||||
}
|
||||
}
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if (tile instanceof TileEnergyPylon) {
|
||||
((TileEnergyPylon) tile).onActivated();
|
||||
if (metadata == 0) {
|
||||
|
||||
Reference in new issue
Block a user