Replace ConfiguredStructure api with Structure (#8642)

This commit is contained in:
Jake Potrebic 2023-02-28 08:36:01 -08:00 committed by GitHub
parent f408c253ec
commit e57441254d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
75 changed files with 283 additions and 486 deletions

View file

@ -3463,13 +3463,14 @@ index 0000000000000000000000000000000000000000..cea9c098ade00ee87b8efc8164ab72f5
+}
diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
new file mode 100644
index 0000000000000000000000000000000000000000..9798a1010120125039cbf226a0e3679cc92f92c7
index 0000000000000000000000000000000000000000..902317d2dc198a1cbfc679810bcb2173644354cb
--- /dev/null
+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
@@ -0,0 +1,512 @@
@@ -0,0 +1,517 @@
+package io.papermc.paper.util;
+
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import io.papermc.paper.math.Position;
+import it.unimi.dsi.fastutil.objects.ObjectRBTreeSet;
+import java.lang.ref.Cleaner;
+import net.minecraft.core.BlockPos;
@ -3933,6 +3934,10 @@ index 0000000000000000000000000000000000000000..9798a1010120125039cbf226a0e3679c
+ return new BlockPos(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
+ }
+
+ public static BlockPos toBlockPos(Position pos) {
+ return new BlockPos(pos.blockX(), pos.blockY(), pos.blockZ());
+ }
+
+ public static boolean isEdgeOfChunk(BlockPos pos) {
+ final int modX = pos.getX() & 15;
+ final int modZ = pos.getZ() & 15;