"Downgrade" Vineflower to 1.10.1 release (#10423)
* "Downgrade" Vineflower to 1.10.1 release The main thing we lose from the 1.11 snapshots is a recent fix for redundant casts. * Thanks intellij * a
This commit is contained in:
parent
4445d23544
commit
862299b6a6
30 changed files with 131 additions and 127 deletions
|
@ -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 aa27b96cf64ddbbc630e2c313ebff7636438aee0..70f9e737b3b9f80395afc3542aafe4a0c774c722 100644
|
||||
index d80e3f5f53b9d28dea574cff5c65dfa3f8148f88..70f9e737b3b9f80395afc3542aafe4a0c774c722 100644
|
||||
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
||||
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
@@ -36,15 +36,16 @@ public class BlockPos extends Vec3i {
|
||||
|
@ -76,15 +76,15 @@ index aa27b96cf64ddbbc630e2c313ebff7636438aee0..70f9e737b3b9f80395afc3542aafe4a0
|
|||
|
||||
public static long asLong(int x, int y, int z) {
|
||||
- long l = 0L;
|
||||
- l |= (x & PACKED_X_MASK) << X_OFFSET;
|
||||
- l |= (y & PACKED_Y_MASK) << 0;
|
||||
- return l | (z & PACKED_Z_MASK) << Z_OFFSET;
|
||||
- l |= ((long)x & PACKED_X_MASK) << X_OFFSET;
|
||||
- l |= ((long)y & PACKED_Y_MASK) << 0;
|
||||
- return l | ((long)z & PACKED_Z_MASK) << Z_OFFSET;
|
||||
+ return (((long) x & (long) 67108863) << 38) | (((long) y & (long) 4095)) | (((long) z & (long) 67108863) << 12); // Paper - inline constants and simplify
|
||||
}
|
||||
|
||||
public static long getFlatIndex(long y) {
|
||||
diff --git a/src/main/java/net/minecraft/core/SectionPos.java b/src/main/java/net/minecraft/core/SectionPos.java
|
||||
index 469e6156704418b6b8f573baee8289726a7a6587..02500dba0c6645add80a73bc837a90331a864652 100644
|
||||
index 27e0d53d5893a13a340deddc93a1128968db7e5b..fe3577e533fb829c85fd4881b1bcca3b70aaf1a5 100644
|
||||
--- a/src/main/java/net/minecraft/core/SectionPos.java
|
||||
+++ b/src/main/java/net/minecraft/core/SectionPos.java
|
||||
@@ -38,7 +38,7 @@ public class SectionPos extends Vec3i {
|
||||
|
@ -180,9 +180,9 @@ index 469e6156704418b6b8f573baee8289726a7a6587..02500dba0c6645add80a73bc837a9033
|
|||
+
|
||||
public static long asLong(int x, int y, int z) {
|
||||
- long l = 0L;
|
||||
- l |= (x & 4194303L) << 42;
|
||||
- l |= (y & 1048575L) << 0;
|
||||
- return l | (z & 4194303L) << 20;
|
||||
- l |= ((long)x & 4194303L) << 42;
|
||||
- l |= ((long)y & 1048575L) << 0;
|
||||
- return l | ((long)z & 4194303L) << 20;
|
||||
+ return (((long) x & 4194303L) << 42) | (((long) y & 1048575L)) | (((long) z & 4194303L) << 20); // Paper - Simplify to reduce instruction count
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue