SteamWar/MissileWars
Archiviert
13
0

Fix Missle Info

Dieser Commit ist enthalten in:
jojo 2020-09-18 21:22:41 +02:00
Ursprung 41baebe1ec
Commit 816a691c35

Datei anzeigen

@ -130,12 +130,18 @@ public class Missile extends SpecialItem {
}
private int count() {
EditSession e = WorldEdit.getInstance().getEditSessionFactory().getEditSession(world, -1);
BlockTypeMask blockTypeMask = new BlockTypeMask(clipboard, TNT);
Bukkit.getLogger().log(Level.SEVERE, e.toString());
Bukkit.getLogger().log(Level.SEVERE, blockTypeMask.toString());
Bukkit.getLogger().log(Level.SEVERE, clipboard.getRegion().toString());
return e.countBlocks(clipboard.getRegion(), blockTypeMask);
int tntCount = 0;
BlockVector3 dimensions = clipboard.getDimensions();
for (int x = 0; x < dimensions.getX(); x++) {
for (int y = 0; y < dimensions.getY(); y++) {
for (int z = 0; z < dimensions.getZ(); z++) {
if (clipboard.getBlock(BlockVector3.at(x, y, z)).getBlockType() == TNT) {
tntCount++;
}
}
}
}
return tntCount;
}
@Override