SteamWar/BauSystem2.0
Archiviert
12
0
Dieser Commit ist enthalten in:
yoyosource 2021-05-02 16:37:23 +02:00
Ursprung 1fa3015b36
Commit 5a5a59305a

Datei anzeigen

@ -62,7 +62,7 @@ public class Depth {
dimensions.setY(Math.abs(dimensions.getY()));
dimensions.setZ(Math.abs(dimensions.getZ()));
if (dimensions.getX() != 0 && dimensions.getY() != 0 && dimensions.getZ() != 0) {
if (tntCount > 4 && dimensions.getX() != 0 && dimensions.getY() != 0 && dimensions.getZ() != 0) {
RegionUtils.message(region, player -> DepthCounter.getMessage(player, dimensions.getBlockX() + 1, dimensions.getBlockY() + 1, dimensions.getBlockZ() + 1, tntCount));
}
@ -79,7 +79,7 @@ public class Depth {
}
public boolean update(List<Block> blocks) {
long overlappingBlocks = blocks.stream().filter(block -> {
long totalBlastResistanceBroken = blocks.stream().filter(block -> {
Vector vector = DepthCounter.blockVector(block.getLocation().toVector());
return vector.getX() >= minVector.getX()
&& vector.getY() >= minVector.getY()
@ -87,8 +87,10 @@ public class Depth {
&& vector.getX() <= maxVector.getX()
&& vector.getY() <= maxVector.getY()
&& vector.getZ() <= maxVector.getZ();
}).count();
if (overlappingBlocks < 4) {
}).filter(block -> block.getType().isBlock())
.mapToLong(block -> (long) (block.getType().getBlastResistance() * 100))
.sum();
if (totalBlastResistanceBroken < 1800) {
return false;
}
lastUpdate = TPSUtils.currentTick.get();