Fix Loader Redstone #89
@ -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) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren