SteamWar/BauSystem
Archiviert
13
0

Fix Loader Redstone #89

Manuell gemergt
Lixfel hat 7 Commits von loaderfix nach master 2020-08-29 11:33:04 +02:00 zusammengeführt
Nur Änderungen aus Commit 4a5e8c3d66 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -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) {