diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/Hull.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/Hull.java index 0248f46b..16af9f4c 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/Hull.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/Hull.java @@ -78,10 +78,8 @@ public class Hull { this.occluding = new BitSet(region.volume()); this.visibility = new BitSet(region.volume()); - IntVector primaryDirection = new IntVector(0, 0, team.isBlue() == (Config.BlueToRedZ > 0) ? -1 : 1); directions = IntStream.range(0, 27) .mapToObj(v -> new IntVector(v % 3 - 1, (v / 3) % 3 - 1, v / 9 - 1)) - .filter(v -> v.sqLength() == 1 || v.x * primaryDirection.x + v.y * primaryDirection.y + v.z * primaryDirection.z == 1) // Not pointing away from primary direction .toArray(IntVector[]::new); for (IntVector direction : directions) { @@ -89,18 +87,10 @@ public class Hull { } } - public boolean blockPrecise(Player player, int chunkX, int chunkY, int chunkZ) { - return !isViewer(player) && !region.chunkSectionOutside(chunkX, chunkY, chunkZ); - } - public boolean isBlockHidden(Player player, int x, int y, int z) { return region.inRegion(x, y, z) && !isViewer(player) && !visibility.get(((y - region.getMinY()) * region.getSizeZ() + (z - region.getMinZ())) * region.getSizeX() + (x - region.getMinX())); } - public boolean isLocationHidden(Player player, Location location) { - return !isViewer(player) && region.inRegion(location) && !visibility.get(new IntVector(location).toId(region)); - } - public boolean isViewer(Player player) { return player != null && viewers.contains(player.getUniqueId()); }