Update upstream

This commit is contained in:
tr7zw 2020-04-27 00:29:45 +02:00
parent 860456ac6e
commit 5cfbd15997
19 changed files with 72 additions and 108 deletions

@ -1 +1 @@
Subproject commit 9f54095dd01d66d023ea1a6bd29dc113a8cc86d5
Subproject commit 003c5b348a524dc0735f80a0e54dabe63a192a48

View File

@ -1,4 +1,4 @@
From 3dbffbf88d8a35c647b66796e145e4a8c09746a1 Mon Sep 17 00:00:00 2001
From 2b1f23977c72ec0992acb920e5ee534bc92b10e2 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Thu, 2 Apr 2020 18:49:56 +0200
Subject: [PATCH] Add NBT-API as first-class lib
@ -11,7 +11,7 @@ Subject: [PATCH] Add NBT-API as first-class lib
4 files changed, 56 insertions(+)
diff --git a/pom.xml b/pom.xml
index d9fb880ff..8a57f1472 100644
index 5d245d153..60ba7dda9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -44,6 +44,11 @@
@ -38,7 +38,7 @@ index d9fb880ff..8a57f1472 100644
</dependencies>
<build>
@@ -208,6 +218,12 @@
@@ -204,6 +214,12 @@
<dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
<!-- when downloading via Maven we can pull depends individually -->
<shadedArtifactAttached>true</shadedArtifactAttached>

View File

@ -1,4 +1,4 @@
From ddf4f73e653d81b5273acc1ad7cfc1ac00fd42e9 Mon Sep 17 00:00:00 2001
From 260d227668da52f96db63df47dc0f997bc023669 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Wed, 26 Feb 2020 17:08:07 +0100
Subject: [PATCH] Modify POM
@ -8,7 +8,7 @@ Subject: [PATCH] Modify POM
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/pom.xml b/pom.xml
index 332a8a45..742e423c 100644
index b8433ddabe..1fae638e93 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,11 +1,12 @@
@ -48,7 +48,7 @@ index 332a8a45..742e423c 100644
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
@@ -148,15 +149,15 @@
@@ -142,15 +143,15 @@
<!-- This builds a completely 'ready to start' jar with all dependencies inside -->
<build>

View File

@ -1,4 +1,4 @@
From 1ca18822518ccf66bdb6f7320c3efc6764abb315 Mon Sep 17 00:00:00 2001
From 75c753cf6c680afd80777eec8b336a059d5882a3 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Wed, 26 Feb 2020 18:37:34 +0100
Subject: [PATCH] Brandings
@ -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 705f6c95e7..5ea4964a85 100644
index 29ea86f023..2b20a83869 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1592,7 +1592,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1593,7 +1593,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
public String getServerModName() {

View File

@ -1,4 +1,4 @@
From 10313deafa4ad7cf44a3b67d50f0ea66daa7410c Mon Sep 17 00:00:00 2001
From 59f4f8b00fc34dd21624532f62dd86779c71abee Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 28 Sep 2013 22:01:47 -0400
Subject: [PATCH] EMC MovedTooQuickly event
@ -9,10 +9,10 @@ also make creative immune to this event
1 file changed, 2 insertions(+)
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 108377d7..5252ebe0 100644
index 480fda7b1f..4d634032e1 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1000,9 +1000,11 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1001,9 +1001,11 @@ public class PlayerConnection implements PacketListenerPlayIn {
if (d11 - d10 > Math.max(f2, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isExemptPlayer()) {
// CraftBukkit end

View File

@ -1,4 +1,4 @@
From 659f4dd7e209ebc4b7d8999326235c699866529d Mon Sep 17 00:00:00 2001
From 160693c0618f9e62b71bde6db0e75ce213846b2b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 10 Jan 2014 22:05:59 -0500
Subject: [PATCH] EMC Disable Snooper
@ -9,10 +9,10 @@ What purpose does it provide...
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 5ea4964a85..4591e49988 100644
index 2b20a83869..ba5e641a9e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1249,11 +1249,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1248,11 +1248,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
//} // Paper
this.methodProfiler.enter("snooper");

View File

@ -1,4 +1,4 @@
From 1e24804eddcaa80dfc30eea7cdb9fedbd090befb Mon Sep 17 00:00:00 2001
From f64b5cb4030b07a957d5491b2bdb724200cba2c8 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 16 Mar 2014 20:44:46 -0400
Subject: [PATCH] EMC EntityKnockbackEvent
@ -11,7 +11,7 @@ Control knockback power of entity attacks
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/main/java/net/minecraft/server/EnchantmentManager.java b/src/main/java/net/minecraft/server/EnchantmentManager.java
index d96c03a1a..9fc637f96 100644
index d96c03a1a1..9fc637f96a 100644
--- a/src/main/java/net/minecraft/server/EnchantmentManager.java
+++ b/src/main/java/net/minecraft/server/EnchantmentManager.java
@@ -186,8 +186,13 @@ public class EnchantmentManager {
@ -31,10 +31,10 @@ index d96c03a1a..9fc637f96 100644
public static int getFireAspectEnchantmentLevel(EntityLiving entityliving) {
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 7afcde608..59408cfd0 100644
index 2e186134ea..49433c4618 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -1062,7 +1062,7 @@ public abstract class EntityHuman extends EntityLiving {
@@ -1066,7 +1066,7 @@ public abstract class EntityHuman extends EntityLiving {
boolean flag = f2 > 0.9F;
boolean flag1 = false;
byte b0 = 0;
@ -44,7 +44,7 @@ index 7afcde608..59408cfd0 100644
if (this.isSprinting() && flag) {
sendSoundEffect(this, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_PLAYER_ATTACK_KNOCKBACK, this.getSoundCategory(), 1.0F, 1.0F); // Paper - send while respecting visibility
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 1991cee43..329f36859 100644
index 1991cee43d..329f36859f 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -1308,7 +1308,7 @@ public abstract class EntityInsentient extends EntityLiving {

View File

@ -1,4 +1,4 @@
From 06150247e8d0c1589772d1bc53820827fa46f273 Mon Sep 17 00:00:00 2001
From 340e04b52f384f9d51e4836b9d83b0bb602b9cfb 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 4591e49988..f4a0104799 100644
index ba5e641a9e..dd54ea9ff7 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1451,6 +1451,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1452,6 +1452,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

View File

@ -1,4 +1,4 @@
From 057e21f3562794b28990ba71720a3a9c70fad92f Mon Sep 17 00:00:00 2001
From d00582eb5652fd1e400e4e6000cec25b347bbb76 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 20 Dec 2017 21:42:45 -0500
Subject: [PATCH] EMC EntityAttackedEntityEvent
@ -10,10 +10,10 @@ and that the damage event was not cancelled.
1 file changed, 7 insertions(+)
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 1f5d15bb4..a27240181 100644
index 75d38bc5d1..306595f5d6 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -999,7 +999,14 @@ public class CraftEventFactory {
@@ -1000,7 +1000,14 @@ public class CraftEventFactory {
callEvent(event);
if (!event.isCancelled()) {

View File

@ -1,4 +1,4 @@
From 2e02837343e76874432755e9ead8042336db131b Mon Sep 17 00:00:00 2001
From ca9d0b939fedae215d08cd309fdc0f664d81b5a8 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 10dc74fb7d..d8b09fb95c 100644
index da41e76da0..05d1c5b72f 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1611,7 +1611,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -1626,7 +1626,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}
public boolean c(NBTTagCompound nbttagcompound) {

View File

@ -1,4 +1,4 @@
From 9cedcad70e04988113afb65264cfe900ab09b2e8 Mon Sep 17 00:00:00 2001
From 04c3df8bcd1dfa73bdd09bd4d5174d6f8023cad8 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Thu, 5 Mar 2020 21:13:33 +0100
Subject: [PATCH] Add getLastTickMs() api
@ -10,7 +10,7 @@ Subject: [PATCH] Add getLastTickMs() api
3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 01c509dca0..b7ddbbb6f1 100644
index 18990b4f5a..a160b88612 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -893,6 +893,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -21,7 +21,7 @@ index 01c509dca0..b7ddbbb6f1 100644
+ public static long lastTickMs = 0; // YAPFA
public void run() {
boolean isThreadDeath = false; // Paper
try {
@@ -945,9 +947,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.methodProfiler.d().d();
}

View File

@ -1,4 +1,4 @@
From d9c8673d1a51a2c509f97e4a8964e81499d2415e Mon Sep 17 00:00:00 2001
From eeae8210a97cd0b81adb1bb350072cf9b69bd60d 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
@ -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 90b7c03800..9094be1b88 100644
index 3c8e231c6a..a2864c9534 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 90b7c03800..9094be1b88 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 d8b09fb95c..c22c5c0ce1 100644
index 05d1c5b72f..b23669c27f 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -750,6 +750,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -765,6 +765,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
try {
this.inLava = false;
@ -407,7 +407,7 @@ index d8b09fb95c..c22c5c0ce1 100644
this.checkBlockCollisions();
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Checking entity block collision");
@@ -881,7 +882,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -896,7 +897,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
VoxelShapeCollision voxelshapecollision = VoxelShapeCollision.a(this);
VoxelShape voxelshape = this.world.getWorldBorder().a();
Stream<VoxelShape> stream = VoxelShapes.c(voxelshape, VoxelShapes.a(axisalignedbb.shrink(1.0E-7D)), OperatorBoolean.AND) ? Stream.empty() : Stream.of(voxelshape);
@ -417,7 +417,7 @@ index d8b09fb95c..c22c5c0ce1 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 b40ba3a211..091256dd73 100644
index 36da5fc43d..cc6822d6c5 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 {

View File

@ -1,4 +1,4 @@
From af238121798ee5b64ad6daa1c3d24d9bb7aa0a61 Mon Sep 17 00:00:00 2001
From 2139d843a596350c00bbfc8ad34eba5488f38108 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
@ -158,7 +158,7 @@ index e40375b67a..2a5574be3a 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 2d07d350d2..51a5741846 100644
index 59d3dc7e81..3d60d34859 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
@ -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 c22c5c0ce1..0d523338e9 100644
index b23669c27f..eed28f5d51 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,7 +280,7 @@ index c22c5c0ce1..0d523338e9 100644
import java.util.UUID;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Stream;
@@ -880,31 +881,60 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -895,31 +896,60 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
private Vec3D e(Vec3D vec3d) {
AxisAlignedBB axisalignedbb = this.getBoundingBox();
VoxelShapeCollision voxelshapecollision = VoxelShapeCollision.a(this);
@ -356,7 +356,7 @@ index c22c5c0ce1..0d523338e9 100644
}
return vec3d1;
@@ -927,6 +957,91 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -942,6 +972,91 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
return a(vec3d, axisalignedbb, world, voxelshapecollision, streamaccumulator);
}
}
@ -449,7 +449,7 @@ index c22c5c0ce1..0d523338e9 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 091256dd73..a337f75995 100644
index cc6822d6c5..f53fb3e497 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2649,6 +2649,7 @@ public abstract class EntityLiving extends Entity {

View File

@ -1,4 +1,4 @@
From c08b2fa1af07759417d4618ac3bd68af853e8ce9 Mon Sep 17 00:00:00 2001
From 57c05c2567f033a07afad7357590904394d42c7e 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 742e423c3a..a7b7c1accc 100644
index 1fae638e93..70add43f4a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -266,6 +266,10 @@
@@ -260,6 +260,10 @@
<pattern>net.minecraft.server</pattern>
<shadedPattern>net.minecraft.server.v${minecraft_version}</shadedPattern>
</relocation>

View File

@ -1,4 +1,4 @@
From b4dc82c91be20d5db78589ed6b66e31572b5616e Mon Sep 17 00:00:00 2001
From 6a7597c57b014e31c633e165dbabcbb47a2faeac 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
@ -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 09684370f0..9e0cb456bb 100644
index d8f5910359..353000c158 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 09684370f0..9e0cb456bb 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 cf56a821ce..e83d343eaf 100644
index 6815ae9045..5c1a7959ae 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 cf56a821ce..e83d343eaf 100644
import javax.annotation.Nullable;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -1128,6 +1130,28 @@ public abstract class PlayerList {
@@ -1164,6 +1166,28 @@ public abstract class PlayerList {
if (team != null) scoreboard.removeTeam(team);
}
// Paper end
@ -224,7 +224,7 @@ index cf56a821ce..e83d343eaf 100644
}
// Paper end
@@ -1167,13 +1191,13 @@ public abstract class PlayerList {
@@ -1203,13 +1227,13 @@ public abstract class PlayerList {
File file = new File(this.server.getWorldServer(DimensionManager.OVERWORLD).getDataManager().getDirectory(), "stats");
File file1 = new File(file, uuid + ".json");

View File

@ -1,4 +1,4 @@
From 9394f4829c1f1787ffd500b09d49c359887e7485 Mon Sep 17 00:00:00 2001
From 44cd6caaed4edfa0a597093669030350f45fbada Mon Sep 17 00:00:00 2001
From: Sotr <i@omc.hk>
Date: Wed, 15 Apr 2020 04:28:25 +0700
Subject: [PATCH] Akarin Cache hashcode for BlockPosition
@ -43,10 +43,10 @@ index c439a8d019..cc18560431 100644
public int compareTo(BaseBlockPosition baseblockposition) {
return this.getY() == baseblockposition.getY() ? (this.getZ() == baseblockposition.getZ() ? this.getX() - baseblockposition.getX() : this.getZ() - baseblockposition.getZ()) : this.getY() - baseblockposition.getY();
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
index 51a5741846..3a2983f411 100644
index 3d60d34859..411b66f693 100644
--- a/src/main/java/net/minecraft/server/BlockPosition.java
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
@@ -439,6 +439,7 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
@@ -440,6 +440,7 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
this.y = j;
this.z = k;
// Paper end
@ -54,7 +54,7 @@ index 51a5741846..3a2983f411 100644
return this;
}
@@ -479,16 +480,19 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
@@ -480,16 +481,19 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
public final void setX(final int x) { this.o(x); } // Paper - OBFHELPER
public void o(int i) {
this.x = i; // Paper change to x

View File

@ -1,4 +1,4 @@
From 24d91934043496ec3c10c46e82d1d3dc0de0fc62 Mon Sep 17 00:00:00 2001
From 41037c807466963b2360cddb62b882b998f90d1b 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
@ -6,10 +6,10 @@ Subject: [PATCH] Purpur Add more timings timers
---
.../co/aikar/timings/MinecraftTimings.java | 22 +++++++++++++++++++
.../minecraft/server/EntityInsentient.java | 12 ++++++++++
.../net/minecraft/server/EntityLiving.java | 12 ++++++++++
.../net/minecraft/server/EntityLiving.java | 16 +++++++++++++-
.../server/PathfinderGoalSelector.java | 6 +++++
.../net/minecraft/server/WorldServer.java | 2 ++
5 files changed, 54 insertions(+)
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 cfbcb6b6d9..15f9d2eaf1 100644
@ -90,20 +90,23 @@ index 329f36859f..25fe07b974 100644
this.K();
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 292c4bda9e..6b910d1949 100644
index 58de79e966..99f62f11cb 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2400,7 +2400,9 @@ public abstract class EntityLiving extends Entity {
@@ -2400,7 +2400,11 @@ public abstract class EntityLiving extends Entity {
}
}
- this.movementTick();
+
+ MinecraftTimings.entityMovementTick.startTiming(); // Purpur
if (!dead) this.movementTick(); // Purpur
+ if (!dead) this.movementTick(); // Purpur
+ MinecraftTimings.entityMovementTick.stopTiming(); // Purpur
+
double d0 = this.locX() - this.lastX;
double d1 = this.locZ() - this.lastZ;
float f = (float) (d0 * d0 + d1 * d1);
@@ -2607,18 +2609,23 @@ public abstract class EntityLiving extends Entity {
@@ -2607,18 +2611,23 @@ public abstract class EntityLiving extends Entity {
this.setMot(d4, d5, d6);
this.world.getMethodProfiler().enter("ai");
@ -127,7 +130,7 @@ index 292c4bda9e..6b910d1949 100644
if (this.jumping) {
if (this.N > 0.0D && (!this.onGround || this.N > 0.4D)) {
this.c(TagsFluid.WATER);
@@ -2633,21 +2640,26 @@ public abstract class EntityLiving extends Entity {
@@ -2633,21 +2642,26 @@ public abstract class EntityLiving extends Entity {
} else {
this.jumpTicks = 0;
}
@ -197,10 +200,10 @@ index 90319909e5..cb12d292cd 100644
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 7d3ecb5bac..e6ed973e0e 100644
index 3aa9cf5269..84ddd78fdd 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -880,7 +880,9 @@ public class WorldServer extends World {
@@ -878,7 +878,9 @@ public class WorldServer extends World {
return IRegistry.ENTITY_TYPE.getKey(entity1.getEntityType()).toString();
});
gameprofilerfiller.c("tickPassenger");

View File

@ -1,39 +0,0 @@
From fc45a9b242c546a092125e45b6d5babb389a4275 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Tue, 21 Apr 2020 15:42:56 +0200
Subject: [PATCH] Purpur Restrict dead entities
---
src/main/java/net/minecraft/server/Entity.java | 2 +-
src/main/java/net/minecraft/server/EntityLiving.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 0d523338e9..9622a21ed6 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1550,7 +1550,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
this.pitch = MathHelper.a(f1, -90.0F, 90.0F) % 360.0F;
this.lastYaw = this.yaw;
this.lastPitch = this.pitch;
- world.getChunkAt((int) Math.floor(this.locX) >> 4, (int) Math.floor(this.locZ) >> 4); // CraftBukkit
+ if (!dead) world.getChunkAt((int) Math.floor(this.locX) >> 4, (int) Math.floor(this.locZ) >> 4); // CraftBukkit // Purpur
}
public void setPositionRotation(BlockPosition blockposition, float f, float f1) {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index c240d4877f..292c4bda9e 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2400,7 +2400,7 @@ public abstract class EntityLiving extends Entity {
}
}
- this.movementTick();
+ if (!dead) this.movementTick(); // Purpur
double d0 = this.locX() - this.lastX;
double d1 = this.locZ() - this.lastZ;
float f = (float) (d0 * d0 + d1 * d1);
--
2.25.1.windows.1

View File

@ -1,4 +1,4 @@
From ac48e566eea223caf0b77c8d53e9db53463ad765 Mon Sep 17 00:00:00 2001
From 9d14414d99e8d640b92a2f18750fbb9d9bffbe8d Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Tue, 21 Apr 2020 16:14:10 +0200
Subject: [PATCH] Modify default configs
@ -22,7 +22,7 @@ index 1c4cd36351..f3439fb4ed 100644
TimingsManager.privacy = getBoolean("timings.server-name-privacy", false);
TimingsManager.hiddenConfigs = getList("timings.hidden-config-entries", Lists.newArrayList("database", "settings.bungeecord-addresses"));
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 88a45e517c..ba3b9bdbe8 100644
index fc189ebc96..b1e2e9b50b 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -662,7 +662,7 @@ public class PaperWorldConfig {