diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/PowerableActivation.java b/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/PowerableActivation.java index 0fc5d4d4..121e97c4 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/PowerableActivation.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/panzern/algorithms/PowerableActivation.java @@ -41,17 +41,20 @@ public class PowerableActivation implements PanzernAlgorithm { public PanzernResult check(Block source, Map adjacent, Set adjacentMaterials) { int powered = 0; int powerable = 0; - for (BlockFace blockFace : HORIZONTAL_FACES) { + for (BlockFace blockFace : BLOCK_FACES) { if (!adjacent.containsKey(blockFace)) { continue; } Block block = adjacent.get(blockFace); - if (block.getBlockData() instanceof Powerable || block.getBlockData() instanceof AnaloguePowerable && block.getType() != Material.OBSERVER) { + if ((block.getType() == Material.HOPPER || block.getBlockData() instanceof Powerable || block.getBlockData() instanceof AnaloguePowerable) && block.getType() != Material.OBSERVER) { powerable++; } if (block.getType() == Material.TNT) { powerable++; } + if (blockFace == BlockFace.DOWN || blockFace == BlockFace.UP) { + continue; + } switch (block.getType()) { case REDSTONE_WIRE: RedstoneWire redstoneWire = (RedstoneWire) block.getBlockData(); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/smartplace/SmartPlaceListener.java b/BauSystem_Main/src/de/steamwar/bausystem/features/smartplace/SmartPlaceListener.java index 84b0053c..7ee8fd45 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/smartplace/SmartPlaceListener.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/smartplace/SmartPlaceListener.java @@ -96,7 +96,7 @@ public class SmartPlaceListener implements Listener { return; } - if (event.getClickedBlock().getType() == event.getMaterial()) { + if (event.getClickedBlock().getType() == event.getMaterial() || event.getMaterial() == Material.HOPPER) { if (!(event.getClickedBlock().getState() instanceof InventoryHolder)) { return; }