Format async pathfinder patch
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
From d917bb33e2dd73efbedc3eb04e8f4a399acd29bd Mon Sep 17 00:00:00 2001
|
From eab6cc99c967ba0a74803168baaada529e009cf4 Mon Sep 17 00:00:00 2001
|
||||||
From: =?UTF-8?q?=E3=84=97=E3=84=A0=CB=8B=20=E3=84=91=E3=84=A7=CB=8A?=
|
From: =?UTF-8?q?=E3=84=97=E3=84=A0=CB=8B=20=E3=84=91=E3=84=A7=CB=8A?=
|
||||||
<tsao-chi@the-lingo.org>
|
<tsao-chi@the-lingo.org>
|
||||||
Date: Sun, 5 Apr 2020 13:01:13 +0800
|
Date: Sun, 5 Apr 2020 13:01:13 +0800
|
||||||
@@ -32,51 +32,42 @@ index abf450917e..4f7f40d5e7 100644
|
|||||||
if (pathtype == PathType.WATER) {
|
if (pathtype == PathType.WATER) {
|
||||||
return false;
|
return false;
|
||||||
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||||
index b763d7f37e..e1f3baa7bb 100644
|
index b763d7f37e..7f061ec1d8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
|
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||||
@@ -22,13 +22,15 @@ public abstract class NavigationAbstract {
|
@@ -29,6 +29,15 @@ public abstract class NavigationAbstract {
|
||||||
protected long j;
|
|
||||||
protected double k;
|
|
||||||
protected float l;
|
|
||||||
- protected boolean m;
|
|
||||||
+ protected boolean m; public boolean needPathfind() { return m; } // Akarin - OBFHELPER
|
|
||||||
protected long n;
|
|
||||||
protected PathfinderAbstract o;
|
|
||||||
- private BlockPosition q;
|
|
||||||
+ private BlockPosition q; public BlockPosition origin() { return q; } // Akarin - OBFHELPER
|
|
||||||
private int r;
|
private int r;
|
||||||
private float s;
|
private float s;
|
||||||
private final Pathfinder t; public Pathfinder getPathfinder() { return this.t; } // Paper - OBFHELPER
|
private final Pathfinder t; public Pathfinder getPathfinder() { return this.t; } // Paper - OBFHELPER
|
||||||
+ private long lastPathfindAsync; // Akarin - Async pathfinder
|
+ // Akarin start - Async pathfinder
|
||||||
+ private static final java.util.concurrent.ExecutorService pathfindExecutor = java.util.concurrent.Executors.newSingleThreadExecutor(new com.google.common.util.concurrent.ThreadFactoryBuilder().setDaemon(true).setNameFormat("StarLink Pathfinder - %d").build()); // Akarin - Async pathfinder
|
+ private long lastPathfindAsync;
|
||||||
|
+ private static final java.util.concurrent.ExecutorService pathfindExecutor =
|
||||||
|
+ java.util.concurrent.Executors.newSingleThreadExecutor(
|
||||||
|
+ new com.google.common.util.concurrent.ThreadFactoryBuilder()
|
||||||
|
+ .setDaemon(true)
|
||||||
|
+ .setNameFormat("StarLink Pathfinder - %d")
|
||||||
|
+ .build());
|
||||||
|
+ // Akarin end
|
||||||
|
|
||||||
public NavigationAbstract(EntityInsentient entityinsentient, World world) {
|
public NavigationAbstract(EntityInsentient entityinsentient, World world) {
|
||||||
this.g = Vec3D.a;
|
this.g = Vec3D.a;
|
||||||
@@ -65,7 +67,7 @@ public abstract class NavigationAbstract {
|
@@ -78,6 +87,40 @@ public abstract class NavigationAbstract {
|
||||||
return this.m;
|
|
||||||
}
|
|
||||||
|
|
||||||
- public void j() {
|
|
||||||
+ public void doPathfind() { j(); } public void j() { // Akarin - OBFHELPER
|
|
||||||
if (this.b.getTime() - this.n > 20L) {
|
|
||||||
if (this.q != null) {
|
|
||||||
this.c = null;
|
|
||||||
@@ -78,6 +80,37 @@ public abstract class NavigationAbstract {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
+ // Akarin Start - Async pathfinder
|
+ // Akarin start - Async pathfinder, copied from above with modification
|
||||||
+ public void doPathfindAsync() {
|
+ public void doPathfindAsync() {
|
||||||
+ if (this.b.getTime() - this.lastPathfindAsync > 20L) {
|
+ if (this.b.getTime() - this.lastPathfindAsync > 20L) {
|
||||||
+ if (this.q != null) {
|
+ if (this.q != null) {
|
||||||
+ this.lastPathfindAsync = this.b.getTime();
|
+ this.lastPathfindAsync = this.b.getTime();
|
||||||
+
|
+
|
||||||
|
+ // Bake chunk cache
|
||||||
+ float f = (float) this.p.getValue();
|
+ float f = (float) this.p.getValue();
|
||||||
+ BlockPosition blockposition = new BlockPosition(this.a);
|
+ BlockPosition blockposition = new BlockPosition(this.a);
|
||||||
+ int k = (int) (f + (float) 8);
|
+ int k = (int) (f + (float) 8);
|
||||||
+ ChunkCache cache = new ChunkCache(this.b, blockposition.b(-k, -k, -k), blockposition.b(k, k, k));
|
+ ChunkCache cache = new ChunkCache(this.b, blockposition.b(-k, -k, -k), blockposition.b(k, k, k));
|
||||||
+
|
+
|
||||||
|
+ // Execute directly if we already have a path entity, or compute one
|
||||||
+ if (this.c != null && !this.c.b()) {
|
+ if (this.c != null && !this.c.b()) {
|
||||||
+ doTickAsync(this.c);
|
+ doTickAsync(this.c);
|
||||||
+ return;
|
+ return;
|
||||||
@@ -93,27 +84,19 @@ index b763d7f37e..e1f3baa7bb 100644
|
|||||||
+ });
|
+ });
|
||||||
+ }
|
+ }
|
||||||
+ } else {
|
+ } else {
|
||||||
|
+ // Execute directly, keep behaviour with vanilla, see the original doTick method
|
||||||
+ doTickAsync(this.c);
|
+ doTickAsync(this.c);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ // Akarin End - Async pathfinder
|
+ // Akarin end
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public final PathEntity calculateDestination(double d0, double d1, double d2) { return a(d0, d1, d2, 0); } public final PathEntity a(double d0, double d1, double d2, int i) { // Paper - OBFHELPER
|
public final PathEntity calculateDestination(double d0, double d1, double d2) { return a(d0, d1, d2, 0); } public final PathEntity a(double d0, double d1, double d2, int i) { // Paper - OBFHELPER
|
||||||
@@ -106,7 +139,7 @@ public abstract class NavigationAbstract {
|
@@ -153,6 +196,17 @@ public abstract class NavigationAbstract {
|
||||||
|
|
||||||
@Nullable
|
|
||||||
// Paper start - Add target
|
|
||||||
- protected PathEntity a(Set<BlockPosition> set, int i, boolean flag, int j) {
|
|
||||||
+ protected PathEntity findPath(Set<BlockPosition> set, int i, boolean flag, int j) { return a(set, 1, flag, j); } protected PathEntity a(Set<BlockPosition> set, int i, boolean flag, int j) { // Akarin - OBFHELPER
|
|
||||||
return this.a(set, null, i, flag, j);
|
|
||||||
}
|
|
||||||
@Nullable protected PathEntity a(Set<BlockPosition> set, Entity target, int i, boolean flag, int j) {
|
|
||||||
@@ -153,6 +186,17 @@ public abstract class NavigationAbstract {
|
|
||||||
return pathentity;
|
return pathentity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+ // Akarin Start - Async pathfinder
|
+ // Akarin start - Async pathfinder, copied and edited from above with only pathfinding
|
||||||
+ protected PathEntity findPathAsync(ChunkCache cache, Set<BlockPosition> set, int j) {
|
+ protected PathEntity findPathAsync(ChunkCache cache, Set<BlockPosition> set, int j) {
|
||||||
+ if (this.a.locY() < 0.0D) {
|
+ if (this.a.locY() < 0.0D) {
|
||||||
+ return null;
|
+ return null;
|
||||||
@@ -123,55 +106,54 @@ index b763d7f37e..e1f3baa7bb 100644
|
|||||||
+ return this.t.a(cache, this.a, set, f, j, this.s);
|
+ return this.t.a(cache, this.a, set, f, j, this.s);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ // Akarin End - Async pathfinder
|
+ // Akarin end
|
||||||
|
|
||||||
public boolean a(double d0, double d1, double d2, double d3) {
|
public boolean a(double d0, double d1, double d2, double d3) {
|
||||||
return this.a(this.a(d0, d1, d2, 1), d3);
|
return this.a(this.a(d0, d1, d2, 1), d3);
|
||||||
@@ -217,7 +261,7 @@ public abstract class NavigationAbstract {
|
@@ -246,6 +300,37 @@ public abstract class NavigationAbstract {
|
||||||
return this.c;
|
|
||||||
}
|
|
||||||
|
|
||||||
- public void c() {
|
|
||||||
+ public void doTick() { c(); } public void c() { // Akarin - OBFHELPER
|
|
||||||
++this.e;
|
|
||||||
if (this.m) {
|
|
||||||
this.j();
|
|
||||||
@@ -246,6 +290,84 @@ public abstract class NavigationAbstract {
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+ // Akarin Start - Async pathfinder
|
+ // Akarin start - Async pathfinder, copied from above
|
||||||
+ public void tickAsync() {
|
+ public void tickAsync() {
|
||||||
+ ++this.e;
|
+ ++this.e;
|
||||||
+ this.doPathfindAsync();
|
+ this.doPathfindAsync();
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
+ // This was copied from above partly with param
|
||||||
+ public void doTickAsync(PathEntity pathEntity) {
|
+ public void doTickAsync(PathEntity pathEntity) {
|
||||||
+ if (shouldContinuePathfind(pathEntity)) return;
|
+ if (shouldContinuePathfind(pathEntity))
|
||||||
|
+ return;
|
||||||
+
|
+
|
||||||
+ Vec3D vec3d;
|
+ Vec3D vec3d;
|
||||||
+
|
|
||||||
+ if (this.a()) {
|
+ if (this.a()) {
|
||||||
+ applyUnitAsync(pathEntity);
|
+ this.applyPath(pathEntity);
|
||||||
+ } else if (pathEntity.f() < pathEntity.e()) {
|
+ } else if (pathEntity.f() < pathEntity.e()) {
|
||||||
+ vec3d = this.b();
|
+ vec3d = this.b();
|
||||||
+ Vec3D vec3d1 = pathEntity.a(this.a, pathEntity.f());
|
+ Vec3D vec3d1 = pathEntity.a(this.a, pathEntity.f());
|
||||||
+
|
+
|
||||||
+ if (vec3d.y > vec3d1.y && !this.a.onGround && MathHelper.floor(vec3d.x) == MathHelper.floor(vec3d1.x) && MathHelper.floor(vec3d.z) == MathHelper.floor(vec3d1.z)) {
|
+ if (vec3d.y > vec3d1.y && !this.a.onGround && MathHelper.floor(vec3d.x) == MathHelper.floor(vec3d1.x) && MathHelper.floor(vec3d.z) == MathHelper.floor(vec3d1.z))
|
||||||
+ pathEntity.c(pathEntity.f() + 1);
|
+ pathEntity.c(pathEntity.f() + 1);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
|
||||||
+
|
+
|
||||||
+ // PacketDebug.a(this.b, this.a, pathEntity, this.l);
|
+ if (shouldContinuePathfind(pathEntity))
|
||||||
+ if (shouldContinuePathfind(pathEntity)) return;
|
+ return;
|
||||||
+
|
+
|
||||||
+ vec3d = pathEntity.a((Entity) this.a);
|
+ vec3d = pathEntity.a((Entity) this.a);
|
||||||
+ BlockPosition blockposition = new BlockPosition(vec3d);
|
+ BlockPosition blockposition = new BlockPosition(vec3d);
|
||||||
+
|
+
|
||||||
+ this.a.getControllerMove().a(vec3d.x, this.b.getType(blockposition.down()).isAir() ? vec3d.y : PathfinderNormal.a((IBlockAccess) this.b, blockposition), vec3d.z, this.d);
|
+ this.a.getControllerMove().a(vec3d.x, this.b.getType(blockposition.down()).isAir() ? vec3d.y : PathfinderNormal.a((IBlockAccess) this.b, blockposition), vec3d.z, this.d);
|
||||||
+ }
|
+ }
|
||||||
+
|
+ // Akarin End - Async pathfinder
|
||||||
+ protected void applyUnitAsync(PathEntity pathEntity) {
|
|
||||||
|
protected void l() {
|
||||||
|
Vec3D vec3d = this.b();
|
||||||
|
@@ -259,6 +344,20 @@ public abstract class NavigationAbstract {
|
||||||
|
|
||||||
|
this.a(vec3d);
|
||||||
|
}
|
||||||
|
+ // Akarin start - Async pathfinder, copied from above with param
|
||||||
|
+ protected void applyPath(PathEntity pathEntity) {
|
||||||
+ Vec3D vec3d = this.b();
|
+ Vec3D vec3d = this.b();
|
||||||
+
|
+
|
||||||
+ this.l = this.a.getWidth() > 0.75F ? this.a.getWidth() / 2.0F : 0.75F - this.a.getWidth() / 2.0F;
|
+ this.l = this.a.getWidth() > 0.75F ? this.a.getWidth() / 2.0F : 0.75F - this.a.getWidth() / 2.0F;
|
||||||
@@ -181,10 +163,18 @@ index b763d7f37e..e1f3baa7bb 100644
|
|||||||
+ pathEntity.c(pathEntity.f() + 1);
|
+ pathEntity.c(pathEntity.f() + 1);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ this.setUnitAsync(pathEntity, vec3d);
|
+ this.applyPath0(pathEntity, vec3d);
|
||||||
+ }
|
+ }
|
||||||
+
|
+ // Akarin end
|
||||||
+ protected void setUnitAsync(PathEntity pathEntity, Vec3D vec3d) {
|
|
||||||
|
protected void a(Vec3D vec3d) {
|
||||||
|
if (this.e - this.f > 100) {
|
||||||
|
@@ -293,10 +392,50 @@ public abstract class NavigationAbstract {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
+ // Akarin start - Async pathfinder, copied from above with param
|
||||||
|
+ protected void applyPath0(PathEntity pathEntity, Vec3D vec3d) {
|
||||||
+ if (this.e - this.f > 100) {
|
+ if (this.e - this.f > 100) {
|
||||||
+ if (vec3d.distanceSquared(this.g) < 2.25D) {
|
+ if (vec3d.distanceSquared(this.g) < 2.25D) {
|
||||||
+ this.o();
|
+ this.o();
|
||||||
@@ -217,95 +207,32 @@ index b763d7f37e..e1f3baa7bb 100644
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ }
|
+ }
|
||||||
+ // Akarin End - Async pathfinder
|
+ // Akarin end
|
||||||
|
|
||||||
protected void l() {
|
public boolean m() {
|
||||||
Vec3D vec3d = this.b();
|
|
||||||
@@ -294,9 +416,14 @@ public abstract class NavigationAbstract {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
- public boolean m() {
|
|
||||||
+ public boolean shouldContinuePathfind() { return m(); } public boolean m() { // Akarin - OBFHELPER
|
|
||||||
return this.c == null || this.c.b();
|
return this.c == null || this.c.b();
|
||||||
}
|
}
|
||||||
+ // Akarin Start - Async pathfinder
|
+ // Akarin start - Async pathfinder, copied from above with param
|
||||||
+ public boolean shouldContinuePathfind(PathEntity pathEntity) {
|
+ public static boolean shouldContinuePathfind(PathEntity pathEntity) {
|
||||||
+ return pathEntity == null || pathEntity.b();
|
+ return pathEntity == null || pathEntity.b();
|
||||||
+ }
|
+ }
|
||||||
+ // Akarin End - Async pathfinder
|
+ // Akarin end
|
||||||
|
|
||||||
public boolean n() {
|
public boolean n() {
|
||||||
return !this.m();
|
return !this.m();
|
||||||
@@ -307,9 +434,9 @@ public abstract class NavigationAbstract {
|
|
||||||
this.c = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
- protected abstract Vec3D b();
|
|
||||||
+ protected Vec3D getEntityPathfindUnit() { return b(); } protected abstract Vec3D b(); // Akarin - OBFHELPER
|
|
||||||
|
|
||||||
- protected abstract boolean a();
|
|
||||||
+ protected boolean canPathfind() { return a(); } protected abstract boolean a(); // Akarin - OBFHELPER
|
|
||||||
|
|
||||||
protected boolean p() {
|
|
||||||
return this.a.az() || this.a.aH();
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/PathEntity.java b/src/main/java/net/minecraft/server/PathEntity.java
|
|
||||||
index dcb4e25080..265b6df4f6 100644
|
|
||||||
--- a/src/main/java/net/minecraft/server/PathEntity.java
|
|
||||||
+++ b/src/main/java/net/minecraft/server/PathEntity.java
|
|
||||||
@@ -110,7 +110,7 @@ public class PathEntity {
|
|
||||||
return "Path(length=" + this.a.size() + ")";
|
|
||||||
}
|
|
||||||
|
|
||||||
- public BlockPosition k() {
|
|
||||||
+ public BlockPosition origin() { return k(); } public BlockPosition k() { // Akarin - OBFHELPER
|
|
||||||
return this.f;
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Pathfinder.java b/src/main/java/net/minecraft/server/Pathfinder.java
|
diff --git a/src/main/java/net/minecraft/server/Pathfinder.java b/src/main/java/net/minecraft/server/Pathfinder.java
|
||||||
index 67c63cfe33..b656adc788 100644
|
index 67c63cfe33..848e2fe8b8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Pathfinder.java
|
--- a/src/main/java/net/minecraft/server/Pathfinder.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Pathfinder.java
|
+++ b/src/main/java/net/minecraft/server/Pathfinder.java
|
||||||
@@ -15,9 +15,9 @@ import javax.annotation.Nullable;
|
@@ -27,7 +27,7 @@ public class Pathfinder {
|
||||||
|
|
||||||
public class Pathfinder {
|
|
||||||
|
|
||||||
- private final Path a = new Path();
|
|
||||||
- private final Set<PathPoint> b = Sets.newHashSet();
|
|
||||||
- private final PathPoint[] c = new PathPoint[32];
|
|
||||||
+ private final Path a = new Path(); private Path nodePath() { return this.a; } // Akarin - OBFHELPER
|
|
||||||
+ private final Set<PathPoint> b = Sets.newHashSet(); private Set<PathPoint> nodesSet() { return this.b; } // Akarin - OBFHELPER
|
|
||||||
+ private final PathPoint[] c = new PathPoint[32]; private PathPoint[] pathNodes() { return this.c; } // Akarin - OBFHELPER
|
|
||||||
private final int d;
|
|
||||||
private final PathfinderAbstract e; public PathfinderAbstract getPathfinder() { return this.e; } // Paper - OBFHELPER
|
|
||||||
|
|
||||||
@@ -26,8 +26,9 @@ public class Pathfinder {
|
|
||||||
this.d = i;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+ public PathEntity findPaths(ChunkCache chunkcache, EntityInsentient entityinsentient, Set<BlockPosition> set, float f, int i, float f1) { return a(chunkcache, entityinsentient, set, f, i, f1); } // Akarin - OBFHELPER
|
|
||||||
@Nullable
|
@Nullable
|
||||||
- public PathEntity a(ChunkCache chunkcache, EntityInsentient entityinsentient, Set<BlockPosition> set, float f, int i, float f1) {
|
- public PathEntity a(ChunkCache chunkcache, EntityInsentient entityinsentient, Set<BlockPosition> set, float f, int i, float f1) {
|
||||||
+ public synchronized PathEntity a(ChunkCache chunkcache, EntityInsentient entityinsentient, Set<BlockPosition> set, float f, int i, float f1) { // Akarin - synchronized
|
+ public synchronized PathEntity a(ChunkCache chunkcache, EntityInsentient entityinsentient, Set<BlockPosition> set, float f, int i, float f1) { // Akarin - synchronized
|
||||||
this.a.a();
|
this.a.a();
|
||||||
this.e.a(chunkcache, entityinsentient);
|
this.e.a(chunkcache, entityinsentient);
|
||||||
PathPoint pathpoint = this.e.b();
|
PathPoint pathpoint = this.e.b();
|
||||||
@@ -117,6 +118,7 @@ public class Pathfinder {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+ private float getNearestDistance(PathPoint pathpoint, Set<PathDestination> set) { return a(pathpoint, set); } // Akarin - OBFHELPER
|
|
||||||
private float a(PathPoint pathpoint, Set<PathDestination> set) {
|
|
||||||
float f = Float.MAX_VALUE;
|
|
||||||
|
|
||||||
@@ -132,6 +134,7 @@ public class Pathfinder {
|
|
||||||
return f;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ private PathEntity gatherAssociatedNodes(PathPoint pathpoint, BlockPosition blockposition, boolean flag) { return a(pathpoint, blockposition, flag); } // Akarin - OBFHELPER
|
|
||||||
private PathEntity a(PathPoint pathpoint, BlockPosition blockposition, boolean flag) {
|
|
||||||
List<PathPoint> list = Lists.newArrayList();
|
|
||||||
PathPoint pathpoint1 = pathpoint;
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/PathfinderTurtle.java b/src/main/java/net/minecraft/server/PathfinderTurtle.java
|
diff --git a/src/main/java/net/minecraft/server/PathfinderTurtle.java b/src/main/java/net/minecraft/server/PathfinderTurtle.java
|
||||||
index 59b1fe289c..1790878ae9 100644
|
index 59b1fe289c..1790878ae9 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PathfinderTurtle.java
|
--- a/src/main/java/net/minecraft/server/PathfinderTurtle.java
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From 6f49babb1764534a6bc31a1639c1906f78c07601 Mon Sep 17 00:00:00 2001
|
From 06fb298ba836bd6e45b9df6a476130fe01c5477c Mon Sep 17 00:00:00 2001
|
||||||
From: =?UTF-8?q?=E3=84=97=E3=84=A0=CB=8B=20=E3=84=91=E3=84=A7=CB=8A?=
|
From: =?UTF-8?q?=E3=84=97=E3=84=A0=CB=8B=20=E3=84=91=E3=84=A7=CB=8A?=
|
||||||
<tsao-chi@the-lingo.org>
|
<tsao-chi@the-lingo.org>
|
||||||
Date: Sun, 5 Apr 2020 14:59:10 +0800
|
Date: Sun, 5 Apr 2020 14:59:10 +0800
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From 87d093899bc100e2de9807de4c47645ffab4abab Mon Sep 17 00:00:00 2001
|
From 8c75c45cc803d5db37e3a7fc7e03cb3c5032fc56 Mon Sep 17 00:00:00 2001
|
||||||
From: =?UTF-8?q?=E3=84=97=E3=84=A0=CB=8B=20=E3=84=91=E3=84=A7=CB=8A?=
|
From: =?UTF-8?q?=E3=84=97=E3=84=A0=CB=8B=20=E3=84=91=E3=84=A7=CB=8A?=
|
||||||
<tsao-chi@the-lingo.org>
|
<tsao-chi@the-lingo.org>
|
||||||
Date: Fri, 10 Apr 2020 15:47:15 +0800
|
Date: Fri, 10 Apr 2020 15:47:15 +0800
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From 0c8b107fe43d652ef656bf1e7bcd4d13ef069cbc Mon Sep 17 00:00:00 2001
|
From 617da22d95039dffd66180630a7bce3f162ea3f6 Mon Sep 17 00:00:00 2001
|
||||||
From: =?UTF-8?q?=E3=84=97=E3=84=A0=CB=8B=20=E3=84=91=E3=84=A7=CB=8A?=
|
From: =?UTF-8?q?=E3=84=97=E3=84=A0=CB=8B=20=E3=84=91=E3=84=A7=CB=8A?=
|
||||||
<tsao-chi@the-lingo.org>
|
<tsao-chi@the-lingo.org>
|
||||||
Date: Mon, 13 Apr 2020 13:18:27 +0800
|
Date: Mon, 13 Apr 2020 13:18:27 +0800
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From 74e7893944513b472e5161b8d2728ece330537b6 Mon Sep 17 00:00:00 2001
|
From 5282d649eb1404ef3fe94792f01b2e6df6581e21 Mon Sep 17 00:00:00 2001
|
||||||
From: Sotr <i@omc.hk>
|
From: Sotr <i@omc.hk>
|
||||||
Date: Wed, 15 Apr 2020 02:39:12 +0700
|
Date: Wed, 15 Apr 2020 02:39:12 +0700
|
||||||
Subject: [PATCH] Tuinity Use ArrayDeque for pendingChunkUpdates in
|
Subject: [PATCH] Tuinity Use ArrayDeque for pendingChunkUpdates in
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From e0f91f8296e3fb8b4b6b5a6b44574171ab87251c Mon Sep 17 00:00:00 2001
|
From 1eb63058ff56e49ad0918786543a7787d0c93e6c Mon Sep 17 00:00:00 2001
|
||||||
From: Sotr <i@omc.hk>
|
From: Sotr <i@omc.hk>
|
||||||
Date: Wed, 15 Apr 2020 02:44:07 +0700
|
Date: Wed, 15 Apr 2020 02:44:07 +0700
|
||||||
Subject: [PATCH] Tuinity Optimise ArraySetSorted#removeIf
|
Subject: [PATCH] Tuinity Optimise ArraySetSorted#removeIf
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From 69300a612aad3329f78e3e3f5b425b1dd24336b8 Mon Sep 17 00:00:00 2001
|
From 2c52a91c87f0fe742d01183d15ac97a79dc06034 Mon Sep 17 00:00:00 2001
|
||||||
From: Sotr <i@omc.hk>
|
From: Sotr <i@omc.hk>
|
||||||
Date: Wed, 15 Apr 2020 02:49:56 +0700
|
Date: Wed, 15 Apr 2020 02:49:56 +0700
|
||||||
Subject: [PATCH] Don't run entity collision code if not needed
|
Subject: [PATCH] Don't run entity collision code if not needed
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From ce2095723644ba66f5b7ed5a555a381b9a1f1443 Mon Sep 17 00:00:00 2001
|
From 64a548a9bc7c044323e88a99a9494b4e023629d4 Mon Sep 17 00:00:00 2001
|
||||||
From: Sotr <i@omc.hk>
|
From: Sotr <i@omc.hk>
|
||||||
Date: Wed, 15 Apr 2020 03:51:50 +0700
|
Date: Wed, 15 Apr 2020 03:51:50 +0700
|
||||||
Subject: [PATCH] Optimize door interact pathfinding
|
Subject: [PATCH] Optimize door interact pathfinding
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From b8f6fa04fb7b2d426d217c3b0ddf84f6b88835a4 Mon Sep 17 00:00:00 2001
|
From 05fdf463f83d5a5f85a4b4bfcb8561db760dc8ae Mon Sep 17 00:00:00 2001
|
||||||
From: Sotr <i@omc.hk>
|
From: Sotr <i@omc.hk>
|
||||||
Date: Wed, 15 Apr 2020 04:16:44 +0700
|
Date: Wed, 15 Apr 2020 04:16:44 +0700
|
||||||
Subject: [PATCH] Remove stream for ender teleport
|
Subject: [PATCH] Remove stream for ender teleport
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
From 93e8fd577e63a60e694c018cbbc93aa71ea544b9 Mon Sep 17 00:00:00 2001
|
From 9c4f314f268580548dc68c00a6f65c77a0a6d7e6 Mon Sep 17 00:00:00 2001
|
||||||
From: Sotr <i@omc.hk>
|
From: Sotr <i@omc.hk>
|
||||||
Date: Wed, 15 Apr 2020 04:28:25 +0700
|
Date: Wed, 15 Apr 2020 04:28:25 +0700
|
||||||
Subject: [PATCH] Cache Hashcode for BlockPosition
|
Subject: [PATCH] Cache hashcode for BlockPosition
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From 7ad553948084e3dd0916bc1f498703279d82d571 Mon Sep 17 00:00:00 2001
|
From 53d6044c5eef40fe43c288df1aaa100ac6088453 Mon Sep 17 00:00:00 2001
|
||||||
From: Sotr <i@omc.hk>
|
From: Sotr <i@omc.hk>
|
||||||
Date: Wed, 15 Apr 2020 17:49:07 +0700
|
Date: Wed, 15 Apr 2020 17:49:07 +0700
|
||||||
Subject: [PATCH] Remove stream and simplify operation in pathfinder
|
Subject: [PATCH] Remove stream and simplify operation in pathfinder
|
||||||
@@ -17,10 +17,10 @@ index 9071d43d8b..2f33aafe34 100644
|
|||||||
public PathDestination(PathPoint pathpoint) {
|
public PathDestination(PathPoint pathpoint) {
|
||||||
super(pathpoint.a, pathpoint.b, pathpoint.c);
|
super(pathpoint.a, pathpoint.b, pathpoint.c);
|
||||||
diff --git a/src/main/java/net/minecraft/server/Pathfinder.java b/src/main/java/net/minecraft/server/Pathfinder.java
|
diff --git a/src/main/java/net/minecraft/server/Pathfinder.java b/src/main/java/net/minecraft/server/Pathfinder.java
|
||||||
index b656adc788..1ff169c345 100644
|
index 848e2fe8b8..6eb4d13f8b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Pathfinder.java
|
--- a/src/main/java/net/minecraft/server/Pathfinder.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Pathfinder.java
|
+++ b/src/main/java/net/minecraft/server/Pathfinder.java
|
||||||
@@ -32,9 +32,20 @@ public class Pathfinder {
|
@@ -31,9 +31,20 @@ public class Pathfinder {
|
||||||
this.a.a();
|
this.a.a();
|
||||||
this.e.a(chunkcache, entityinsentient);
|
this.e.a(chunkcache, entityinsentient);
|
||||||
PathPoint pathpoint = this.e.b();
|
PathPoint pathpoint = this.e.b();
|
||||||
@@ -42,7 +42,7 @@ index b656adc788..1ff169c345 100644
|
|||||||
PathEntity pathentity = this.a(pathpoint, map, f, i, f1);
|
PathEntity pathentity = this.a(pathpoint, map, f, i, f1);
|
||||||
|
|
||||||
this.e.a();
|
this.e.a();
|
||||||
@@ -42,8 +53,8 @@ public class Pathfinder {
|
@@ -41,8 +52,8 @@ public class Pathfinder {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@@ -53,7 +53,7 @@ index b656adc788..1ff169c345 100644
|
|||||||
|
|
||||||
pathpoint.e = 0.0F;
|
pathpoint.e = 0.0F;
|
||||||
pathpoint.f = this.a(pathpoint, set);
|
pathpoint.f = this.a(pathpoint, set);
|
||||||
@@ -99,11 +110,11 @@ public class Pathfinder {
|
@@ -98,11 +109,11 @@ public class Pathfinder {
|
||||||
|
|
||||||
if (set.stream().anyMatch(PathDestination::f)) {
|
if (set.stream().anyMatch(PathDestination::f)) {
|
||||||
stream = set.stream().filter(PathDestination::f).map((pathdestination) -> {
|
stream = set.stream().filter(PathDestination::f).map((pathdestination) -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user