From c2e3a4e77e490231d81cb510f172c8b8101835a9 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Fri, 7 Jun 2024 16:23:05 +0100 Subject: [PATCH] Address vector deprecations --- .../fastasyncworldedit/core/anvil/MCAChunk.java | 2 +- .../core/regions/WorldRegionsRegion.java | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/anvil/MCAChunk.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/anvil/MCAChunk.java index 116e6c6ba..9b085e64f 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/anvil/MCAChunk.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/anvil/MCAChunk.java @@ -994,7 +994,7 @@ public class MCAChunk implements IChunk { tiles.entrySet().removeIf(e -> { BlockVector3 pos = e.getKey(); return set - .getBlock(pos.getBlockX(), pos.getBlockY(), pos.getBlockZ()) + .getBlock(pos.x(), pos.y(), pos.z()) .getOrdinalChar() != BlockTypesCache.ReservedIDs.__RESERVED__; }); for (int layer = set.getMinSectionPosition(); layer <= set.getMaxSectionPosition(); layer++) { diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/regions/WorldRegionsRegion.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/regions/WorldRegionsRegion.java index 144df3271..63cbb4698 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/regions/WorldRegionsRegion.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/regions/WorldRegionsRegion.java @@ -64,8 +64,8 @@ public class WorldRegionsRegion implements Region { public Iterator iterator() { Queue queue = new ArrayDeque<>(getChunks()); return new Iterator<>() { - private final int by = min.getY(); - private final int ty = max.getY(); + private final int by = min.y(); + private final int ty = max.y(); private final MutableBlockVector3 mutable = new MutableBlockVector3(); private BlockVector2 chunk = queue.poll(); @@ -156,7 +156,7 @@ public class WorldRegionsRegion implements Region { BlockVector3 min = getMinimumPoint(); BlockVector3 max = getMaximumPoint(); - return max.getX() - min.getX() + 1; + return max.x() - min.x() + 1; } /** @@ -169,7 +169,7 @@ public class WorldRegionsRegion implements Region { BlockVector3 min = getMinimumPoint(); BlockVector3 max = getMaximumPoint(); - return max.getY() - min.getY() + 1; + return max.y() - min.y() + 1; } /** @@ -182,7 +182,7 @@ public class WorldRegionsRegion implements Region { BlockVector3 min = getMinimumPoint(); BlockVector3 max = getMaximumPoint(); - return max.getZ() - min.getZ() + 1; + return max.z() - min.z() + 1; } @Override @@ -233,8 +233,8 @@ public class WorldRegionsRegion implements Region { return new Iterator<>() { private final MutableBlockVector3 mutable = new MutableBlockVector3(); - private final int by = min.getY() >> 4; - private final int ty = max.getY() >> 4; + private final int by = min.y() >> 4; + private final int ty = max.y() >> 4; private BlockVector2 chunk = chunks.poll(); private int y; @@ -267,7 +267,7 @@ public class WorldRegionsRegion implements Region { @Override public int size() { - return getChunks().size() * ((max.getY() >> 4) - (min.getY() >> 4)); + return getChunks().size() * ((max.y() >> 4) - (min.y() >> 4)); } }; }