From 09835204a06c3f7287787fe165f26e8d0e6072f3 Mon Sep 17 00:00:00 2001 From: Zeanon Date: Mon, 3 May 2021 18:47:53 +0200 Subject: [PATCH] Hopefully not a full 100 lines of patch anmore --- .../Fixed_Blockposition_shift.patch | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Spigot/SteamWar-Patches/Fixed_Blockposition_shift.patch b/Spigot/SteamWar-Patches/Fixed_Blockposition_shift.patch index a69aa24..eb7b23b 100644 --- a/Spigot/SteamWar-Patches/Fixed_Blockposition_shift.patch +++ b/Spigot/SteamWar-Patches/Fixed_Blockposition_shift.patch @@ -5,8 +5,8 @@ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP =================================================================== diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java new file mode 100644 ---- /dev/null (date 1620046359455) -+++ b/src/main/java/net/minecraft/server/BlockPosition.java (date 1620046359455) +--- /dev/null (date 1620060409436) ++++ b/src/main/java/net/minecraft/server/BlockPosition.java (date 1620060409436) @@ -0,0 +1,478 @@ +package net.minecraft.server; + @@ -67,12 +67,12 @@ new file mode 100644 + OfInt ofint = dynamic.asIntStream().spliterator(); + int[] aint = new int[3]; + -+ if (ofint.tryAdvance((Consumer) (i) -> { // Steamwar - decomile fix ++ if (ofint.tryAdvance((Consumer) (i) -> { // Paper - decomile fix + aint[0] = i; -+ }) && ofint.tryAdvance((Consumer) (i) -> { // Steamwar - decompile fix ++ }) && ofint.tryAdvance((Consumer) (i) -> { // Paper - decompile fix + aint[1] = i; + })) { -+ ofint.tryAdvance((Consumer) (i) -> { // Steamwar - decompile fix ++ ofint.tryAdvance((Consumer) (i) -> { // Paper - decompile fix + aint[2] = i; + }); + } @@ -193,7 +193,7 @@ new file mode 100644 + } + + public BlockPosition shift(EnumDirection enumdirection) { -+ // Steamwar Start - Paper Patch ++ // Paper Start - Optimize BlockPosition + switch(enumdirection) { + case UP: + return new BlockPosition(this.getX(), this.getY() + 1, this.getZ()); @@ -210,7 +210,7 @@ new file mode 100644 + default: + return new BlockPosition(this.getX() + enumdirection.getAdjacentX(), this.getY() + enumdirection.getAdjacentY(), this.getZ() + enumdirection.getAdjacentZ()); + } -+ // Steamwar End ++ // Paper End + } + + @Override