diff --git a/BauSystem_15/src/de/steamwar/bausystem/world/AutoLoader_15.java b/BauSystem_15/src/de/steamwar/bausystem/world/AutoLoader_15.java index 0ffa968..af0148b 100644 --- a/BauSystem_15/src/de/steamwar/bausystem/world/AutoLoader_15.java +++ b/BauSystem_15/src/de/steamwar/bausystem/world/AutoLoader_15.java @@ -50,20 +50,15 @@ class AutoLoader_15 { relative = block.getRelative(swtch.getFacing()); break; } - relative.getState().update(true); - updateBlock(relative.getLocation()); + updateBlock(relative); } return true; } - static void updateBlock(Location location) { - for (int[] offset : offsets) { - location.add(offset[0], offset[1], offset[2]); - if (!location.getBlock().getType().isOccluding()) continue; - BlockData data = location.getBlock().getBlockData(); - location.getBlock().setType(Material.BARRIER, true); - location.getBlock().setBlockData(data, true); - } + static void updateBlock(Block block) { + BlockData data = block.getBlockData(); + block.setType(Material.BARRIER, true); + block.setBlockData(data, true); } static void onPlayerInteract(IAutoLoader loader, PlayerInteractEvent event) {