fix some issues

This commit is contained in:
Lulu13022002 2024-10-25 20:09:45 +02:00
parent e19f48475d
commit 3518974270
No known key found for this signature in database
GPG key ID: 491C8F0B8ACDEB01
22 changed files with 41 additions and 41 deletions

View file

@ -7,7 +7,7 @@ Inline bit operations and reduce instruction count to make these hot
operations faster
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
index 0d51fb4be8b49e3b57c3c55aff6bcf13d5c78ddd..afbd1651cb29e95b5cc7474f986c52c29676fb8a 100644
index 0d51fb4be8b49e3b57c3c55aff6bcf13d5c78ddd..a5dab9b1652ac76372d88316e2c165eed6317891 100644
--- a/src/main/java/net/minecraft/core/BlockPos.java
+++ b/src/main/java/net/minecraft/core/BlockPos.java
@@ -50,15 +50,17 @@ public class BlockPos extends Vec3i {
@ -20,7 +20,7 @@ index 0d51fb4be8b49e3b57c3c55aff6bcf13d5c78ddd..afbd1651cb29e95b5cc7474f986c52c2
- private static final long PACKED_Y_MASK = (1L << PACKED_Y_LENGTH) - 1L;
- private static final long PACKED_Z_MASK = (1L << PACKED_HORIZONTAL_LENGTH) - 1L;
+ // Paper start - Optimize Bit Operations by inlining
+ private static final int PACKED_HORIZONTAL_LENGTH = 26;
+ public static final int PACKED_HORIZONTAL_LENGTH = 26;
+ public static final int PACKED_Y_LENGTH = 12;
+ private static final long PACKED_X_MASK = 67108863;
+ private static final long PACKED_Y_MASK = 4095;