mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-22 18:46:27 +01:00
Update Upstream
This commit is contained in:
parent
1e07d21232
commit
41748cbde0
2
Tuinity
2
Tuinity
@ -1 +1 @@
|
||||
Subproject commit 121cca1e2fc2e47a6475f1c0a7a1397236701f16
|
||||
Subproject commit d8b8905f9829b9386bd291f9e5ad48bdece9dded
|
@ -1,4 +1,4 @@
|
||||
From 07849069eed17d58d7c61ecfa2e3bba7d0555111 Mon Sep 17 00:00:00 2001
|
||||
From 13f89b74b1436e976886022660635024de615d9f Mon Sep 17 00:00:00 2001
|
||||
From: tr7zw <tr7zw@live.de>
|
||||
Date: Wed, 26 Feb 2020 18:37:34 +0100
|
||||
Subject: [PATCH] Brandings
|
||||
@ -14,7 +14,7 @@ Subject: [PATCH] Brandings
|
||||
create mode 100644 src/main/java/de/tr7zw/yapfa/YapfaVersionFetcher.java
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
||||
index cd6e259239..e3599d115f 100644
|
||||
index cd6e25923..e3599d115 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
||||
@@ -18,6 +18,7 @@ public final class PaperConsole extends SimpleTerminalConsole {
|
||||
@ -27,7 +27,7 @@ index cd6e259239..e3599d115f 100644
|
||||
}
|
||||
diff --git a/src/main/java/de/tr7zw/yapfa/YapfaVersionFetcher.java b/src/main/java/de/tr7zw/yapfa/YapfaVersionFetcher.java
|
||||
new file mode 100644
|
||||
index 0000000000..b7a73408ea
|
||||
index 000000000..b7a73408e
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/de/tr7zw/yapfa/YapfaVersionFetcher.java
|
||||
@@ -0,0 +1,20 @@
|
||||
@ -53,10 +53,10 @@ index 0000000000..b7a73408ea
|
||||
+}
|
||||
\ No newline at end of file
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 85cc5914e1..32468041ea 100644
|
||||
index a2ab9d5d4..e3f0a3e78 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1622,7 +1622,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1624,7 +1624,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
|
||||
public String getServerModName() {
|
||||
@ -66,7 +66,7 @@ index 85cc5914e1..32468041ea 100644
|
||||
|
||||
public CrashReport b(CrashReport crashreport) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 0f97cf2b41..b281f05c4b 100644
|
||||
index 0f97cf2b4..b281f05c4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -205,7 +205,7 @@ import javax.annotation.Nullable; // Paper
|
||||
@ -79,7 +79,7 @@ index 0f97cf2b41..b281f05c4b 100644
|
||||
private final String bukkitVersion = Versioning.getBukkitVersion();
|
||||
private final Logger logger = Logger.getLogger("Minecraft");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index b58f2ef5ce..c66a63a8fb 100644
|
||||
index b58f2ef5c..c66a63a8f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -306,7 +306,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@ -92,7 +92,7 @@ index b58f2ef5ce..c66a63a8fb 100644
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
index 001b1e5197..e3c4ad3d35 100644
|
||||
index 001b1e519..e3c4ad3d3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
@@ -11,7 +11,7 @@ public final class Versioning {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 313aa7dbfcfbc0833119366596bf490329225319 Mon Sep 17 00:00:00 2001
|
||||
From 5cee71773043550df6701c08422afa6da056b2e9 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Fri, 5 Sep 2014 23:04:54 -0400
|
||||
Subject: [PATCH] EMC Accept the EULA
|
||||
@ -9,10 +9,10 @@ Starlis LLC, the owner of Empire Minecraft, accepts the Minecraft EULA with this
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 04aa83f0c6..e361f4a7f1 100644
|
||||
index 11c575484..c9e7b24b8 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1481,6 +1481,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1483,6 +1483,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
System.err.println( "If you do not agree to the above EULA please stop your server and remove this flag immediately." );
|
||||
}
|
||||
// Spigot End
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 2b3a7a3e330ba54e96c75309226fdc821166ec26 Mon Sep 17 00:00:00 2001
|
||||
From c2d4a276383e4205cb62f2c7f6aeeb310d765655 Mon Sep 17 00:00:00 2001
|
||||
From: tr7zw <tr7zw@live.de>
|
||||
Date: Wed, 26 Feb 2020 21:39:58 +0100
|
||||
Subject: [PATCH] Don't save Fireworks and Arrows
|
||||
@ -8,10 +8,10 @@ Subject: [PATCH] Don't save Fireworks and Arrows
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index de7e553fdc..05c2b214a9 100644
|
||||
index 37f854764..6d62a1af5 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -1630,7 +1630,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1763,7 +1763,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
}
|
||||
|
||||
public boolean c(NBTTagCompound nbttagcompound) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From c23a00f954500be998491e8480b87f05568206d0 Mon Sep 17 00:00:00 2001
|
||||
From 954cad21e69b376f2b67a36c0b5d8de51679f260 Mon Sep 17 00:00:00 2001
|
||||
From: tr7zw <tr7zw@live.de>
|
||||
Date: Thu, 5 Mar 2020 22:31:50 +0100
|
||||
Subject: [PATCH] Add config, yapfa command and basic settings
|
||||
@ -15,7 +15,7 @@ Subject: [PATCH] Add config, yapfa command and basic settings
|
||||
|
||||
diff --git a/src/main/java/de/tr7zw/yapfa/YapfaCommand.java b/src/main/java/de/tr7zw/yapfa/YapfaCommand.java
|
||||
new file mode 100644
|
||||
index 0000000000..76d83f3db4
|
||||
index 000000000..76d83f3db
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/de/tr7zw/yapfa/YapfaCommand.java
|
||||
@@ -0,0 +1,129 @@
|
||||
@ -151,7 +151,7 @@ index 0000000000..76d83f3db4
|
||||
\ No newline at end of file
|
||||
diff --git a/src/main/java/de/tr7zw/yapfa/YapfaConfig.java b/src/main/java/de/tr7zw/yapfa/YapfaConfig.java
|
||||
new file mode 100644
|
||||
index 0000000000..9711cbc522
|
||||
index 000000000..9711cbc52
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/de/tr7zw/yapfa/YapfaConfig.java
|
||||
@@ -0,0 +1,219 @@
|
||||
@ -376,7 +376,7 @@ index 0000000000..9711cbc522
|
||||
+}
|
||||
\ No newline at end of file
|
||||
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
index c95e1722ac..7297f87189 100644
|
||||
index c95e1722a..7297f8718 100644
|
||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
@@ -194,6 +194,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
@ -396,10 +396,10 @@ index c95e1722ac..7297f87189 100644
|
||||
|
||||
this.setSpawnAnimals(dedicatedserverproperties.spawnAnimals);
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 05c2b214a9..195f74ac16 100644
|
||||
index 6d62a1af5..2e3329bd2 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -763,6 +763,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -768,6 +768,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
||||
try {
|
||||
this.inLava = false;
|
||||
@ -407,8 +407,8 @@ index 05c2b214a9..195f74ac16 100644
|
||||
this.checkBlockCollisions();
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.a(throwable, "Checking entity block collision");
|
||||
@@ -897,9 +898,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
// Tuinity end - prevent entities from moving into unloaded chunks
|
||||
@@ -1029,9 +1030,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
private Vec3D e(Vec3D vec3d) {
|
||||
AxisAlignedBB axisalignedbb = this.getBoundingBox();
|
||||
VoxelShapeCollision voxelshapecollision = VoxelShapeCollision.a(this);
|
||||
- VoxelShape voxelshape = this.world.getWorldBorder().a();
|
||||
@ -421,7 +421,7 @@ index 05c2b214a9..195f74ac16 100644
|
||||
Vec3D vec3d1 = vec3d.g() == 0.0D ? vec3d : a(this, vec3d, axisalignedbb, this.world, voxelshapecollision, streamaccumulator);
|
||||
boolean flag = vec3d.x != vec3d1.x;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index ccd5b56fa8..9e30bb818c 100644
|
||||
index 11be0931c..b77960710 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -246,6 +246,7 @@ public abstract class EntityLiving extends Entity {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 4e8d32b3794901c61a39754a2c732174fabe3413 Mon Sep 17 00:00:00 2001
|
||||
From f5d3e38a68911e376a1ff0860f8df4a6d9af9044 Mon Sep 17 00:00:00 2001
|
||||
From: tr7zw <tr7zw@live.de>
|
||||
Date: Mon, 23 Mar 2020 18:20:58 +0100
|
||||
Subject: [PATCH] Remove Stream usage
|
||||
@ -17,7 +17,7 @@ This removes streams from the entity collision code, Crafting Manager and some o
|
||||
|
||||
diff --git a/src/main/java/de/tr7zw/yapfa/collision/CollisionHelper.java b/src/main/java/de/tr7zw/yapfa/collision/CollisionHelper.java
|
||||
new file mode 100644
|
||||
index 0000000000..d67753937f
|
||||
index 000000000..d67753937
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/de/tr7zw/yapfa/collision/CollisionHelper.java
|
||||
@@ -0,0 +1,123 @@
|
||||
@ -145,7 +145,7 @@ index 0000000000..d67753937f
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
|
||||
index d051a54aa0..48f764ef02 100644
|
||||
index d051a54aa..48f764ef0 100644
|
||||
--- a/src/main/java/net/minecraft/server/Block.java
|
||||
+++ b/src/main/java/net/minecraft/server/Block.java
|
||||
@@ -99,7 +99,7 @@ public class Block implements IMaterial {
|
||||
@ -158,7 +158,7 @@ index d051a54aa0..48f764ef02 100644
|
||||
entity.enderTeleportTo(entity.locX(), entity.locY() + 1.0D + d0, entity.locZ());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
index 3bf17ccdae..67f95a9a6e 100644
|
||||
index 3bf17ccda..67f95a9a6 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
@@ -72,7 +72,7 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
|
||||
@ -171,7 +171,7 @@ index 3bf17ccdae..67f95a9a6e 100644
|
||||
|
||||
public static long a(long i, EnumDirection enumdirection) {
|
||||
diff --git a/src/main/java/net/minecraft/server/CraftingManager.java b/src/main/java/net/minecraft/server/CraftingManager.java
|
||||
index f0d7a91fa0..15e2439d69 100644
|
||||
index f0d7a91fa..15e2439d6 100644
|
||||
--- a/src/main/java/net/minecraft/server/CraftingManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/CraftingManager.java
|
||||
@@ -8,14 +8,18 @@ import com.google.gson.GsonBuilder;
|
||||
@ -269,7 +269,7 @@ index f0d7a91fa0..15e2439d69 100644
|
||||
|
||||
public Stream<MinecraftKey> c() {
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 195f74ac16..7d80c1779e 100644
|
||||
index 2e3329bd2..902c98cf8 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -13,6 +13,7 @@ import java.util.Locale;
|
||||
@ -280,8 +280,8 @@ index 195f74ac16..7d80c1779e 100644
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.stream.Stream;
|
||||
@@ -898,31 +899,60 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
// Tuinity end - prevent entities from moving into unloaded chunks
|
||||
@@ -1030,31 +1031,60 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
private Vec3D e(Vec3D vec3d) {
|
||||
AxisAlignedBB axisalignedbb = this.getBoundingBox();
|
||||
VoxelShapeCollision voxelshapecollision = VoxelShapeCollision.a(this);
|
||||
-
|
||||
@ -317,28 +317,28 @@ index 195f74ac16..7d80c1779e 100644
|
||||
- Vec3D vec3d4 = a(this, new Vec3D(vec3d.x, 0.0D, vec3d.z), axisalignedbb.b(vec3d3), this.world, voxelshapecollision, streamaccumulator).e(vec3d3);
|
||||
+ Vec3D vec3d2 = aNonStream(this, new Vec3D(vec3d.x, (double) this.H, vec3d.z), axisalignedbb, this.world, voxelshapecollision, worldBorder);
|
||||
+ Vec3D vec3d3 = aNonStream(this, new Vec3D(0.0D, (double) this.H, 0.0D), axisalignedbb.b(vec3d.x, 0.0D, vec3d.z), this.world, voxelshapecollision, worldBorder);
|
||||
|
||||
- if (b(vec3d4) > b(vec3d2)) {
|
||||
- vec3d2 = vec3d4;
|
||||
+
|
||||
+ if (vec3d3.y < (double) this.H) {
|
||||
+ Vec3D vec3d4 = aNonStream(this, new Vec3D(vec3d.x, 0.0D, vec3d.z), axisalignedbb.b(vec3d3), this.world, voxelshapecollision, worldBorder).e(vec3d3);
|
||||
+
|
||||
+ if (b(vec3d4) > b(vec3d2)) {
|
||||
+ vec3d2 = vec3d4;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
- if (b(vec3d4) > b(vec3d2)) {
|
||||
- vec3d2 = vec3d4;
|
||||
+ if (b(vec3d2) > b(vec3d1)) {
|
||||
+ return vec3d2.e(aNonStream(this, new Vec3D(0.0D, -vec3d2.y + vec3d.y, 0.0D), axisalignedbb.b(vec3d2), this.world, voxelshapecollision, worldBorder));
|
||||
}
|
||||
- }
|
||||
+ } else {
|
||||
+ Vec3D vec3d2 = a(this, new Vec3D(vec3d.x, (double) this.H, vec3d.z), axisalignedbb, this.world, voxelshapecollision, streamaccumulator);
|
||||
+ Vec3D vec3d3 = a(this, new Vec3D(0.0D, (double) this.H, 0.0D), axisalignedbb.b(vec3d.x, 0.0D, vec3d.z), this.world, voxelshapecollision, streamaccumulator);
|
||||
|
||||
- if (b(vec3d2) > b(vec3d1)) {
|
||||
- return vec3d2.e(a(this, new Vec3D(0.0D, -vec3d2.y + vec3d.y, 0.0D), axisalignedbb.b(vec3d2), this.world, voxelshapecollision, streamaccumulator));
|
||||
- }
|
||||
+ if (b(vec3d2) > b(vec3d1)) {
|
||||
+ return vec3d2.e(aNonStream(this, new Vec3D(0.0D, -vec3d2.y + vec3d.y, 0.0D), axisalignedbb.b(vec3d2), this.world, voxelshapecollision, worldBorder));
|
||||
+ }
|
||||
+ } else {
|
||||
+ Vec3D vec3d2 = a(this, new Vec3D(vec3d.x, (double) this.H, vec3d.z), axisalignedbb, this.world, voxelshapecollision, streamaccumulator);
|
||||
+ Vec3D vec3d3 = a(this, new Vec3D(0.0D, (double) this.H, 0.0D), axisalignedbb.b(vec3d.x, 0.0D, vec3d.z), this.world, voxelshapecollision, streamaccumulator);
|
||||
+
|
||||
+ if (vec3d3.y < (double) this.H) {
|
||||
+ Vec3D vec3d4 = a(this, new Vec3D(vec3d.x, 0.0D, vec3d.z), axisalignedbb.b(vec3d3), this.world, voxelshapecollision, streamaccumulator).e(vec3d3);
|
||||
+
|
||||
@ -356,7 +356,7 @@ index 195f74ac16..7d80c1779e 100644
|
||||
}
|
||||
|
||||
return vec3d1;
|
||||
@@ -945,6 +975,91 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1078,6 +1108,91 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
return a(vec3d, axisalignedbb, world, voxelshapecollision, streamaccumulator);
|
||||
}
|
||||
}
|
||||
@ -449,7 +449,7 @@ index 195f74ac16..7d80c1779e 100644
|
||||
public static Vec3D a(Vec3D vec3d, AxisAlignedBB axisalignedbb, StreamAccumulator<VoxelShape> streamaccumulator) {
|
||||
double d0 = vec3d.x;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 9e30bb818c..1c11480b88 100644
|
||||
index b77960710..65685734d 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -2662,6 +2662,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@ -461,7 +461,7 @@ index 9e30bb818c..1c11480b88 100644
|
||||
this.world.getMethodProfiler().exit();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/VoxelShapes.java b/src/main/java/net/minecraft/server/VoxelShapes.java
|
||||
index 6db190de59..e0527459a6 100644
|
||||
index 5e24ce485..d651ed5fb 100644
|
||||
--- a/src/main/java/net/minecraft/server/VoxelShapes.java
|
||||
+++ b/src/main/java/net/minecraft/server/VoxelShapes.java
|
||||
@@ -5,9 +5,12 @@ import com.google.common.math.DoubleMath;
|
||||
@ -477,7 +477,7 @@ index 6db190de59..e0527459a6 100644
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public final class VoxelShapes {
|
||||
@@ -202,6 +205,106 @@ public final class VoxelShapes {
|
||||
@@ -256,6 +259,106 @@ public final class VoxelShapes {
|
||||
|
||||
return d0;
|
||||
}
|
||||
|
@ -1,15 +1,15 @@
|
||||
From 051299e171be68ddcf5a6286ed39ddcd78012928 Mon Sep 17 00:00:00 2001
|
||||
From 3ee6626ba5050ec3ba8df5090c3f04fd06313571 Mon Sep 17 00:00:00 2001
|
||||
From: tr7zw <tr7zw@live.de>
|
||||
Date: Mon, 23 Mar 2020 23:11:10 +0100
|
||||
Subject: [PATCH] Add option for only players to have collisions with Entities
|
||||
|
||||
---
|
||||
src/main/java/de/tr7zw/yapfa/YapfaConfig.java | 6 ++++++
|
||||
src/main/java/net/minecraft/server/EntityLiving.java | 11 +++++++++--
|
||||
2 files changed, 15 insertions(+), 2 deletions(-)
|
||||
src/main/java/de/tr7zw/yapfa/YapfaConfig.java | 6 ++
|
||||
.../net/minecraft/server/EntityLiving.java | 68 ++++++++++---------
|
||||
2 files changed, 43 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/de/tr7zw/yapfa/YapfaConfig.java b/src/main/java/de/tr7zw/yapfa/YapfaConfig.java
|
||||
index 9711cbc522..655c4e68f3 100644
|
||||
index 9711cbc52..655c4e68f 100644
|
||||
--- a/src/main/java/de/tr7zw/yapfa/YapfaConfig.java
|
||||
+++ b/src/main/java/de/tr7zw/yapfa/YapfaConfig.java
|
||||
@@ -216,4 +216,10 @@ public class YapfaConfig {
|
||||
@ -25,27 +25,87 @@ index 9711cbc522..655c4e68f3 100644
|
||||
}
|
||||
\ No newline at end of file
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 1c11480b88..9ff9e9be2b 100644
|
||||
index 65685734d..7a01daa57 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -2702,8 +2702,15 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2702,40 +2702,46 @@ public abstract class EntityLiving extends Entity {
|
||||
if (i <= 0 && world.paperConfig.maxCollisionsPerEntity <= 0) {
|
||||
return;
|
||||
}
|
||||
- // Paper - end don't run getEntities if we're not going to use its result
|
||||
- List<Entity> list = this.world.getEntities(this, this.getBoundingBox(), IEntitySelector.a(this));
|
||||
+ // Tuinity - end don't run getEntities if we're not going to use its result
|
||||
+ // YAPFA start
|
||||
+ List<Entity> list = null;
|
||||
+ if(de.tr7zw.yapfa.YapfaConfig.onlyPlayerCollisions) {
|
||||
+ list = this.world.getEntities(this, this.getBoundingBox(), entity -> entity.getEntityType() == EntityTypes.PLAYER);
|
||||
+ } else {
|
||||
+ list = this.world.getEntities(this, this.getBoundingBox(), IEntitySelector.a(this));
|
||||
+ }
|
||||
+ // YAPFA end
|
||||
|
||||
if (!list.isEmpty()) {
|
||||
// Paper - move up
|
||||
// Tuinity start - reduce memory allocation from collideNearby
|
||||
List<Entity> list = com.tuinity.tuinity.util.CachedLists.getTempGetEntitiesList();
|
||||
- this.world.getEntities(this, this.getBoundingBox(), IEntitySelector.a(this), list);
|
||||
try {
|
||||
- // Tuinity end - reduce memory allocation from collideNearby
|
||||
-
|
||||
- if (!list.isEmpty()) {
|
||||
- // Paper - move up
|
||||
- int j;
|
||||
-
|
||||
- if (i > 0 && list.size() > i - 1 && this.random.nextInt(4) == 0) {
|
||||
- j = 0;
|
||||
-
|
||||
- for (int k = 0; k < list.size(); ++k) {
|
||||
- if (!((Entity) list.get(k)).isPassenger()) {
|
||||
- ++j;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if (j > i - 1) {
|
||||
- this.damageEntity(DamageSource.CRAMMING, 6.0F);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- numCollisions = Math.max(0, numCollisions - world.paperConfig.maxCollisionsPerEntity); // Paper
|
||||
- for (j = 0; j < list.size() && numCollisions < world.paperConfig.maxCollisionsPerEntity; ++j) { // Paper
|
||||
- Entity entity = (Entity) list.get(j);
|
||||
- entity.numCollisions++; // Paper
|
||||
- numCollisions++; // Paper
|
||||
-
|
||||
- this.C(entity);
|
||||
- }
|
||||
- }
|
||||
+ if(de.tr7zw.yapfa.YapfaConfig.onlyPlayerCollisions) {
|
||||
+ this.world.getEntities(this, this.getBoundingBox(), entity -> entity.getEntityType() == EntityTypes.PLAYER, list);
|
||||
+ } else {
|
||||
+ this.world.getEntities(this, this.getBoundingBox(), IEntitySelector.a(this), list);
|
||||
+ }
|
||||
+ // Tuinity end - reduce memory allocation from collideNearby
|
||||
+ // YAPFA end
|
||||
+
|
||||
+ if (!list.isEmpty()) {
|
||||
+ // Paper - move up
|
||||
+ int j;
|
||||
+
|
||||
+ if (i > 0 && list.size() > i - 1 && this.random.nextInt(4) == 0) {
|
||||
+ j = 0;
|
||||
+
|
||||
+ for (int k = 0; k < list.size(); ++k) {
|
||||
+ if (!((Entity) list.get(k)).isPassenger()) {
|
||||
+ ++j;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (j > i - 1) {
|
||||
+ this.damageEntity(DamageSource.CRAMMING, 6.0F);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ numCollisions = Math.max(0, numCollisions - world.paperConfig.maxCollisionsPerEntity); // Paper
|
||||
+ for (j = 0; j < list.size() && numCollisions < world.paperConfig.maxCollisionsPerEntity; ++j) { // Paper
|
||||
+ Entity entity = (Entity) list.get(j);
|
||||
+ entity.numCollisions++; // Paper
|
||||
+ numCollisions++; // Paper
|
||||
+
|
||||
+ this.C(entity);
|
||||
+ }
|
||||
+ }
|
||||
} finally { // Tuinity start - reduce memory allocation from collideNearby
|
||||
com.tuinity.tuinity.util.CachedLists.returnTempGetEntitiesList(list);
|
||||
} // Tuinity end - reduce memory allocation from collideNearby
|
||||
--
|
||||
2.25.1.windows.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 908e9bd4e1b6ffce5999666e559d47ae4c01bb97 Mon Sep 17 00:00:00 2001
|
||||
From af9085217948103cff26160050ed7921cf82e33f Mon Sep 17 00:00:00 2001
|
||||
From: tr7zw <tr7zw@live.de>
|
||||
Date: Sun, 29 Mar 2020 01:59:27 +0100
|
||||
Subject: [PATCH] Add option for pushable TileEntities
|
||||
@ -15,7 +15,7 @@ Subject: [PATCH] Add option for pushable TileEntities
|
||||
create mode 100644 src/main/java/net/minecraft/server/TileEntityPiston.java
|
||||
|
||||
diff --git a/src/main/java/de/tr7zw/yapfa/YapfaConfig.java b/src/main/java/de/tr7zw/yapfa/YapfaConfig.java
|
||||
index 29587589cb..e804bd3f5c 100644
|
||||
index 29587589c..e804bd3f5 100644
|
||||
--- a/src/main/java/de/tr7zw/yapfa/YapfaConfig.java
|
||||
+++ b/src/main/java/de/tr7zw/yapfa/YapfaConfig.java
|
||||
@@ -226,4 +226,9 @@ public class YapfaConfig {
|
||||
@ -30,7 +30,7 @@ index 29587589cb..e804bd3f5c 100644
|
||||
}
|
||||
\ No newline at end of file
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockPiston.java b/src/main/java/net/minecraft/server/BlockPiston.java
|
||||
index b29525c40d..86c760f40d 100644
|
||||
index b29525c40..86c760f40 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockPiston.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockPiston.java
|
||||
@@ -241,11 +241,16 @@ public class BlockPiston extends BlockDirectional {
|
||||
@ -131,7 +131,7 @@ index b29525c40d..86c760f40d 100644
|
||||
+
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PistonExtendsChecker.java b/src/main/java/net/minecraft/server/PistonExtendsChecker.java
|
||||
index de1c98ccab..92f1839953 100644
|
||||
index de1c98cca..92f183995 100644
|
||||
--- a/src/main/java/net/minecraft/server/PistonExtendsChecker.java
|
||||
+++ b/src/main/java/net/minecraft/server/PistonExtendsChecker.java
|
||||
@@ -29,6 +29,7 @@ public class PistonExtendsChecker {
|
||||
@ -278,7 +278,7 @@ index de1c98ccab..92f1839953 100644
|
||||
+ // YAPFA end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
index a8e64dfdab..f23cd98b0c 100644
|
||||
index a8e64dfda..f23cd98b0 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
@@ -252,4 +252,10 @@ public abstract class TileEntity implements KeyedObject { // Paper
|
||||
@ -294,7 +294,7 @@ index a8e64dfdab..f23cd98b0c 100644
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntityPiston.java b/src/main/java/net/minecraft/server/TileEntityPiston.java
|
||||
new file mode 100644
|
||||
index 0000000000..b32f231981
|
||||
index 000000000..b32f23198
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntityPiston.java
|
||||
@@ -0,0 +1,369 @@
|
||||
@ -669,10 +669,10 @@ index 0000000000..b32f231981
|
||||
+}
|
||||
\ No newline at end of file
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index d620f8e920..ae823c2c9a 100644
|
||||
index 30adf5295..6998ffe76 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -390,6 +390,13 @@ public class WorldServer extends World {
|
||||
@@ -714,6 +714,13 @@ public class WorldServer extends World {
|
||||
|
||||
if (type instanceof ITileEntity) {
|
||||
TileEntity replacement = ((ITileEntity) type).createTile(this);
|
||||
|
@ -1,4 +1,4 @@
|
||||
From ef033a81b8d3d245c710b948b1f2243eb8db8c82 Mon Sep 17 00:00:00 2001
|
||||
From 8832a6c5969a2cef1ebd85699b32f7d8d9855270 Mon Sep 17 00:00:00 2001
|
||||
From: tr7zw <tr7zw@live.de>
|
||||
Date: Thu, 2 Apr 2020 18:49:38 +0200
|
||||
Subject: [PATCH] Add NBT-API as first-class lib
|
||||
@ -8,10 +8,10 @@ Subject: [PATCH] Add NBT-API as first-class lib
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index f2cc703fe6..8893d9626e 100644
|
||||
index e58fddead..5a4c6fe4f 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -305,6 +305,10 @@
|
||||
@@ -306,6 +306,10 @@
|
||||
<pattern>net.minecraft.server</pattern>
|
||||
<shadedPattern>net.minecraft.server.v${minecraft_version}</shadedPattern>
|
||||
</relocation>
|
||||
|
@ -1,4 +1,4 @@
|
||||
From c153e75244501d62f7a6e871dc4c2db8e39d9ee0 Mon Sep 17 00:00:00 2001
|
||||
From 381ad90bef07ef98b91bd95a736fc3f911380bf7 Mon Sep 17 00:00:00 2001
|
||||
From: tr7zw <tr7zw@live.de>
|
||||
Date: Sat, 4 Apr 2020 23:23:04 +0200
|
||||
Subject: [PATCH] Player saving async FileIO
|
||||
@ -12,7 +12,7 @@ Subject: [PATCH] Player saving async FileIO
|
||||
5 files changed, 139 insertions(+), 64 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
|
||||
index 79e11eebb7..8d08c91fe6 100644
|
||||
index 79e11eebb..8d08c91fe 100644
|
||||
--- a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
|
||||
@@ -26,6 +26,8 @@ import java.util.List;
|
||||
@ -145,7 +145,7 @@ index 79e11eebb7..8d08c91fe6 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
index c1e8ff6ab3..db4f628830 100644
|
||||
index c1e8ff6ab..db4f62883 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
@@ -733,11 +733,23 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@ -183,7 +183,7 @@ index c1e8ff6ab3..db4f628830 100644
|
||||
nbttagcompound.set("ShoulderEntityLeft", this.getShoulderEntityLeft());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 269580ae2a..b2af3be151 100644
|
||||
index ada082e67..86f8b4899 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -16,6 +16,8 @@ import java.util.Map;
|
||||
@ -195,7 +195,7 @@ index 269580ae2a..b2af3be151 100644
|
||||
import javax.annotation.Nullable;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -1203,6 +1205,28 @@ public abstract class PlayerList {
|
||||
@@ -1206,6 +1208,28 @@ public abstract class PlayerList {
|
||||
if (team != null) scoreboard.removeTeam(team);
|
||||
}
|
||||
// Paper end
|
||||
@ -224,7 +224,7 @@ index 269580ae2a..b2af3be151 100644
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@@ -1242,13 +1266,13 @@ public abstract class PlayerList {
|
||||
@@ -1245,13 +1269,13 @@ public abstract class PlayerList {
|
||||
File file = new File(this.server.getWorldServer(DimensionManager.OVERWORLD).getDataManager().getDirectory(), "stats");
|
||||
File file1 = new File(file, uuid + ".json");
|
||||
|
||||
@ -241,7 +241,7 @@ index 269580ae2a..b2af3be151 100644
|
||||
serverstatisticmanager = new ServerStatisticManager(this.server, file1);
|
||||
// this.o.put(uuid, serverstatisticmanager); // CraftBukkit
|
||||
diff --git a/src/main/java/net/minecraft/server/ServerStatisticManager.java b/src/main/java/net/minecraft/server/ServerStatisticManager.java
|
||||
index b3c9a5a845..edeb8b4fbb 100644
|
||||
index b3c9a5a84..edeb8b4fb 100644
|
||||
--- a/src/main/java/net/minecraft/server/ServerStatisticManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/ServerStatisticManager.java
|
||||
@@ -20,6 +20,9 @@ import java.util.Map;
|
||||
@ -308,7 +308,7 @@ index b3c9a5a845..edeb8b4fbb 100644
|
||||
//ServerStatisticManager.LOGGER.warn("Invalid statistic in {}: Don't know what {} is", this.d, s2); // EMC
|
||||
});
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java
|
||||
index 350ac42d6b..c80673770c 100644
|
||||
index 350ac42d6..c80673770 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldNBTStorage.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java
|
||||
@@ -15,6 +15,9 @@ import org.apache.logging.log4j.Logger;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From d95050df2dd50d305522f68fb5652f125e4b1245 Mon Sep 17 00:00:00 2001
|
||||
From 6648efbcbfca05c1806c2a031b493e7fd1a26493 Mon Sep 17 00:00:00 2001
|
||||
From: tr7zw <tr7zw@live.de>
|
||||
Date: Tue, 21 Apr 2020 15:49:52 +0200
|
||||
Subject: [PATCH] Purpur Add more timings timers
|
||||
@ -12,7 +12,7 @@ Subject: [PATCH] Purpur Add more timings timers
|
||||
5 files changed, 57 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java
|
||||
index fdb135fa3f..00423cc3af 100644
|
||||
index fdb135fa3..00423cc3a 100644
|
||||
--- a/src/main/java/co/aikar/timings/MinecraftTimings.java
|
||||
+++ b/src/main/java/co/aikar/timings/MinecraftTimings.java
|
||||
@@ -45,6 +45,28 @@ public final class MinecraftTimings {
|
||||
@ -45,7 +45,7 @@ index fdb135fa3f..00423cc3af 100644
|
||||
|
||||
private MinecraftTimings() {}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
index eec4343741..916deddd7e 100644
|
||||
index eec434374..916deddd7 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
@@ -677,21 +677,32 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
@ -90,7 +90,7 @@ index eec4343741..916deddd7e 100644
|
||||
this.K();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 9ff9e9be2b..418fe5909d 100644
|
||||
index 7a01daa57..1d66afe9b 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -2413,7 +2413,11 @@ public abstract class EntityLiving extends Entity {
|
||||
@ -158,7 +158,7 @@ index 9ff9e9be2b..418fe5909d 100644
|
||||
if(!de.tr7zw.yapfa.YapfaConfig.disableEntityCollisions) // YAPFA
|
||||
this.collideNearby();
|
||||
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java
|
||||
index a68fc11ec6..95dde66531 100644
|
||||
index a68fc11ec..95dde6653 100644
|
||||
--- a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java
|
||||
+++ b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java
|
||||
@@ -78,6 +78,7 @@ public class PathfinderGoalSelector {
|
||||
@ -200,10 +200,10 @@ index a68fc11ec6..95dde66531 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index ae823c2c9a..dcd689e1e6 100644
|
||||
index 6998ffe76..c3a9464ca 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -986,7 +986,9 @@ public class WorldServer extends World {
|
||||
@@ -1310,7 +1310,9 @@ public class WorldServer extends World {
|
||||
return IRegistry.ENTITY_TYPE.getKey(entity1.getEntityType()).toString();
|
||||
});
|
||||
gameprofilerfiller.c("tickPassenger");
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 36734e54aa75c3c3a6790d0d4023bcf8d7e6edb4 Mon Sep 17 00:00:00 2001
|
||||
From d3a648658991704e1f296e197c63dc661f47a3cf Mon Sep 17 00:00:00 2001
|
||||
From: tr7zw <tr7zw@live.de>
|
||||
Date: Mon, 11 May 2020 21:02:57 +0200
|
||||
Subject: [PATCH] lithium MixinBox
|
||||
@ -8,10 +8,10 @@ Subject: [PATCH] lithium MixinBox
|
||||
1 file changed, 30 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/AxisAlignedBB.java b/src/main/java/net/minecraft/server/AxisAlignedBB.java
|
||||
index 8b6b5ca634..93a0239c20 100644
|
||||
index 688c5b1bd..e78e27588 100644
|
||||
--- a/src/main/java/net/minecraft/server/AxisAlignedBB.java
|
||||
+++ b/src/main/java/net/minecraft/server/AxisAlignedBB.java
|
||||
@@ -38,12 +38,38 @@ public class AxisAlignedBB {
|
||||
@@ -150,12 +150,38 @@ public class AxisAlignedBB {
|
||||
return new AxisAlignedBB((double) structureboundingbox.a, (double) structureboundingbox.b, (double) structureboundingbox.c, (double) (structureboundingbox.d + 1), (double) (structureboundingbox.e + 1), (double) (structureboundingbox.f + 1));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user