From 29453f1dbeb10812aad3280d0c2b7883084426a0 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 7 Jul 2020 01:41:02 -0400 Subject: [PATCH] Fix bug on y bitset extraction from 1.16 update accidently copied z's to y. seems to impact light only, but is not the source of the light bug we've been trying to fix --- .../0504-Optimize-Bit-Operations-by-inlining.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/0504-Optimize-Bit-Operations-by-inlining.patch b/Spigot-Server-Patches/0504-Optimize-Bit-Operations-by-inlining.patch index eac454310..a2e0ec02c 100644 --- a/Spigot-Server-Patches/0504-Optimize-Bit-Operations-by-inlining.patch +++ b/Spigot-Server-Patches/0504-Optimize-Bit-Operations-by-inlining.patch @@ -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/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 163a6c83a2e494e28981974ef9accd3255e562c2..551ca4471fa3e80fd812938bfce53ca1854dc94d 100644 +index 163a6c83a2e494e28981974ef9accd3255e562c2..8c2a4b57aba17b43517f7b09c4adf65ae5904b6d 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -53,28 +53,29 @@ public class BlockPosition extends BaseBlockPosition { @@ -31,7 +31,7 @@ index 163a6c83a2e494e28981974ef9accd3255e562c2..551ca4471fa3e80fd812938bfce53ca1 public static int c(long i) { - return (int) (i << 64 - BlockPosition.h >> 64 - BlockPosition.h); -+ return (int) ((i << 26) >> 38); // Paper - simplify/inline ++ return (int) ((i << 52) >> 52); // Paper - simplify/inline } public static int d(long i) {