Archiviert
13
0

Optimized ServerPing & Fixed BlockPosition$shift #5

Geschlossen
Zeanon möchte 2 Commits von ServerPing_Blockposition nach master mergen
Nur Änderungen aus Commit 09835204a0 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -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 diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
new file mode 100644 new file mode 100644
--- /dev/null (date 1620046359455) --- /dev/null (date 1620060409436)
+++ b/src/main/java/net/minecraft/server/BlockPosition.java (date 1620046359455) +++ b/src/main/java/net/minecraft/server/BlockPosition.java (date 1620060409436)
@@ -0,0 +1,478 @@ @@ -0,0 +1,478 @@
+package net.minecraft.server; +package net.minecraft.server;
+ +
@ -67,12 +67,12 @@ new file mode 100644
+ OfInt ofint = dynamic.asIntStream().spliterator(); + OfInt ofint = dynamic.asIntStream().spliterator();
+ int[] aint = new int[3]; + int[] aint = new int[3];
+ +
+ if (ofint.tryAdvance((Consumer<? super Integer>) (i) -> { // Steamwar - decomile fix + if (ofint.tryAdvance((Consumer<? super Integer>) (i) -> { // Paper - decomile fix
+ aint[0] = i; + aint[0] = i;
+ }) && ofint.tryAdvance((Consumer<? super Integer>) (i) -> { // Steamwar - decompile fix + }) && ofint.tryAdvance((Consumer<? super Integer>) (i) -> { // Paper - decompile fix
+ aint[1] = i; + aint[1] = i;
+ })) { + })) {
+ ofint.tryAdvance((Consumer<? super Integer>) (i) -> { // Steamwar - decompile fix + ofint.tryAdvance((Consumer<? super Integer>) (i) -> { // Paper - decompile fix
+ aint[2] = i; + aint[2] = i;
+ }); + });
+ } + }
@ -193,7 +193,7 @@ new file mode 100644
+ } + }
+ +
+ public BlockPosition shift(EnumDirection enumdirection) { + public BlockPosition shift(EnumDirection enumdirection) {
+ // Steamwar Start - Paper Patch + // Paper Start - Optimize BlockPosition
+ switch(enumdirection) { + switch(enumdirection) {
+ case UP: + case UP:
+ return new BlockPosition(this.getX(), this.getY() + 1, this.getZ()); + return new BlockPosition(this.getX(), this.getY() + 1, this.getZ());
@ -210,7 +210,7 @@ new file mode 100644
+ default: + default:
+ return new BlockPosition(this.getX() + enumdirection.getAdjacentX(), this.getY() + enumdirection.getAdjacentY(), this.getZ() + enumdirection.getAdjacentZ()); + return new BlockPosition(this.getX() + enumdirection.getAdjacentX(), this.getY() + enumdirection.getAdjacentY(), this.getZ() + enumdirection.getAdjacentZ());
+ } + }
+ // Steamwar End + // Paper End
+ } + }
+ +
+ @Override + @Override