SteamWar/BauSystem
Archiviert
13
0

Reduced Number of Updated Blocks

Dieser Commit ist enthalten in:
Chaoscaot 2020-08-29 11:18:49 +02:00
Ursprung a933da7c30
Commit 4a5e8c3d66

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