Update upstream, add Global Eula patch

This commit is contained in:
tr7zw 2020-07-25 17:16:49 +02:00
parent 10506dbe51
commit 0a12b36619
14 changed files with 87 additions and 34 deletions

@ -1 +1 @@
Subproject commit 3950d4b720874c0bb282d986749a3e3cf9ceed1b
Subproject commit 699f5f2fb02e78493f44499a6b6f91c8d2406922

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Modify POM
diff --git a/pom.xml b/pom.xml
index a957d8a643805989b759bcc1f9eb2701032d2e35..853f1fe45804cb69f3af9cd58ccc65ea242fe4f9 100644
index 4004ff5d3b9285c737dffcfee5ab48a164de6fc9..2659ac2ae914807a9f3eff0244d3f7601e22f1cc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,18 +3,18 @@

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add GameProfileLookupEvent
diff --git a/pom.xml b/pom.xml
index 853f1fe45804cb69f3af9cd58ccc65ea242fe4f9..d6065069db2d44e9e779e3d9f6a69fa37aeaeebd 100644
index 2659ac2ae914807a9f3eff0244d3f7601e22f1cc..1d705769fb9d7764c1b9e4a16e791cd7764dcc50 100644
--- a/pom.xml
+++ b/pom.xml
@@ -39,6 +39,10 @@

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add getLastTickMs() api
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 4e92ce18227c8f650fe5c6f4a670e6f56d629872..db5be70744097fb07fb5a8d494120f050bef0a4d 100644
index 62cc1c74c11f56dcbd1e24e9c5478497742e6351..c5d497cb33ecc65c256a39b72453a135bb67d205 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1760,6 +1760,14 @@ public final class Bukkit {
@@ -1771,6 +1771,14 @@ public final class Bukkit {
return server.getMobGoals();
}
// Paper end
@ -24,10 +24,10 @@ index 4e92ce18227c8f650fe5c6f4a670e6f56d629872..db5be70744097fb07fb5a8d494120f05
@NotNull
public static Server.Spigot spigot() {
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 65a40c4a9b24fa607d284e203becba034520b75d..ce69ad962989fe00b3166082a61d507058639525 100644
index 46c4d98ce32a0b1d8cfd391f2c7a9566a045cb55..eec88dfd1f7d2c9a46dc6d623f87c01420b94212 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1546,4 +1546,15 @@ public interface Server extends PluginMessageRecipient {
@@ -1555,4 +1555,15 @@ public interface Server extends PluginMessageRecipient {
@NotNull
com.destroystokyo.paper.entity.ai.MobGoals getMobGoals();
// Paper end

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add NBT-API as first-class lib
diff --git a/pom.xml b/pom.xml
index d6065069db2d44e9e779e3d9f6a69fa37aeaeebd..875e46318a774bacf7b156d1ca51b95c9e1c40ab 100644
index 1d705769fb9d7764c1b9e4a16e791cd7764dcc50..897f536837bd33e25c7a1a0f7a2c6bc8575291c9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -43,6 +43,11 @@

View File

@ -6,7 +6,7 @@ Subject: [PATCH] EMC Add ChatColor.getById
Bukkit has had a map of this for years and it was totally unused...
diff --git a/src/main/java/org/bukkit/ChatColor.java b/src/main/java/org/bukkit/ChatColor.java
index 44d597d7a6f66a18b8037e971170ff7cea5e825f..3461c5a860f571d7cd2ecace4b56c37cbcc85d37 100644
index 4594701d77c5d0f744bece871b98d9f6f73eb5a7..06bdfddb7b1acb7bb7b347ad1aa13bff0c823ab1 100644
--- a/src/main/java/org/bukkit/ChatColor.java
+++ b/src/main/java/org/bukkit/ChatColor.java
@@ -263,6 +263,15 @@ public enum ChatColor {

View File

@ -44,10 +44,10 @@ index 0000000000000000000000000000000000000000..b7a73408ea6a1e66aa97a0d924d26fac
+}
\ 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 eb71fa6e39ecf477f18a2ae5a159d8b62ad4bfb5..6949761d8b1b07f49accb47d78840fd801a83b88 100644
index 0200f21cbec750ada4f92ecab93d21bc8b6f0dc0..626c32e6ea801047595a114c4ff61ec92be4c9d9 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1504,7 +1504,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1505,7 +1505,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
public String getServerModName() {
@ -57,7 +57,7 @@ index eb71fa6e39ecf477f18a2ae5a159d8b62ad4bfb5..6949761d8b1b07f49accb47d78840fd8
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 ba42171096b1d0be518c43f6eacc85ead935a941..c29002ac45f007db9eb4d0609b9b4b97a8dc199a 100644
index d434bd93bc26840129274f45a303fe2c1a44f132..8fc533009f417c1f18e7d118ac2ca1b8967e6a24 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -231,7 +231,7 @@ import javax.annotation.Nullable; // Paper

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add getLastTickMs() api
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 6949761d8b1b07f49accb47d78840fd801a83b88..ca166e498c188a5f4dc979de475d827c6d75361b 100644
index 626c32e6ea801047595a114c4ff61ec92be4c9d9..8252fd263192e787d5d99967b6f1009a2827589d 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -933,6 +933,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -36,10 +36,10 @@ index 6949761d8b1b07f49accb47d78840fd801a83b88..ca166e498c188a5f4dc979de475d827c
} else {
this.a((CrashReport) null);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index c29002ac45f007db9eb4d0609b9b4b97a8dc199a..b0dff61d1bb03d7699b345277d49bc3ebaded9e0 100644
index 8fc533009f417c1f18e7d118ac2ca1b8967e6a24..3b0f4a5700c704728c88fab15305fa4701cfeb80 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2381,4 +2381,13 @@ public final class CraftServer implements Server {
@@ -2388,4 +2388,13 @@ public final class CraftServer implements Server {
return mobGoals;
}
// Paper end

View File

@ -398,7 +398,7 @@ index 9430cda80517b736aa07b8e57a1ae0f9f895f32d..0ad2d20eb188c8db40157f1e68d280f9
});
StreamAccumulator<VoxelShape> streamaccumulator = new StreamAccumulator<>(Stream.concat(stream1, stream));
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 4545bd371c460d360a65d80b31af7819d718c97a..168d0d852eb87357931a11077906788a61041d6b 100644
index 8a773d7de4b8eb2f6846ca277e1ef0af2a86abec..4c9b82284c529088fc977e7bd55c1f0f9dc7bbc5 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -266,6 +266,7 @@ public abstract class EntityLiving extends Entity {

View File

@ -21,10 +21,10 @@ index 35ac0206c9a5481191752e78f61ccf4582a86f10..071e9f9a5447c7ff4fb15d9c5a6fced4
}
\ 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 168d0d852eb87357931a11077906788a61041d6b..26bbf2fc413e193507272d930e42e1ec9133abd7 100644
index 4c9b82284c529088fc977e7bd55c1f0f9dc7bbc5..0170b2e877d4ef0b24a9c1e48da061e02cda2653 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2836,40 +2836,46 @@ public abstract class EntityLiving extends Entity {
@@ -2833,40 +2833,46 @@ public abstract class EntityLiving extends Entity {
if (i <= 0 && world.paperConfig.maxCollisionsPerEntity <= 0) {
return;
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Player saving async FileIO
diff --git a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
index 1588d101e0939c883757a5be91b30966d456a6bf..6cdcca870766214fa44c3930ce37e286a2549467 100644
index 17789407b9e86896a963a305a13357286aa5f319..030e76685d8111a4feec3a91791ab06ef339604a 100644
--- a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
+++ b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
@@ -27,6 +27,8 @@ import java.util.List;
@ -23,7 +23,7 @@ index 1588d101e0939c883757a5be91b30966d456a6bf..6cdcca870766214fa44c3930ce37e286
private boolean m = true;
+ public static ExecutorService saveThread = Executors.newSingleThreadExecutor(); // YAPFA
// Tuinity start - fix advancement data player leakage
// Paper start - fix advancement data player leakage
final Map<CriterionTriggerAbstract, Set<CriterionTrigger.a>> criterionData = Maps.newIdentityHashMap();
@@ -227,53 +230,66 @@ public class AdvancementDataPlayer {
@ -176,7 +176,7 @@ index 2cada09ced1660526e9c112c2c8d92bbf9d6ea98..321726139df8b10bf264a4cabdc55423
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 813787435d44e0054a052e24e1ef53ea8d713637..f932086c1192307fa4d66ec3510c78a3cce6b69b 100644
index 9382e8f79e8edec8885c629a36e230fbec50e1fb..871b104b60d03a7abbff80130c4b2ea3254676e2 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -18,6 +18,9 @@ import java.util.Map;
@ -189,7 +189,7 @@ index 813787435d44e0054a052e24e1ef53ea8d713637..f932086c1192307fa4d66ec3510c78a3
import javax.annotation.Nullable;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -1248,6 +1251,28 @@ public abstract class PlayerList {
@@ -1258,6 +1261,28 @@ public abstract class PlayerList {
if (team != null) scoreboard.removeTeam(team);
}
// Paper end
@ -218,7 +218,7 @@ index 813787435d44e0054a052e24e1ef53ea8d713637..f932086c1192307fa4d66ec3510c78a3
}
// Paper end
@@ -1285,13 +1310,13 @@ public abstract class PlayerList {
@@ -1295,13 +1320,13 @@ public abstract class PlayerList {
File file = this.server.a(SavedFile.STATS).toFile();
File file1 = new File(file, uuid + ".json");

View File

@ -5,12 +5,12 @@ Subject: [PATCH] Purpur Add more timings timers
diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java
index 2966c5731761b125d841c8f3ea80f68bc189c162..ae55867370e496043994867b31c82c37b690efc2 100644
index 85b25eace786fa0d7694afa405f9d2bdf4937b6e..b81eeea483e1313a3b4a329bf09ac6e40a7b267f 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 {
@@ -46,6 +46,28 @@ public final class MinecraftTimings {
public static final Timing scoreboardScoreSearch = Timings.ofSafe("Scoreboard score search"); // Tuinity - add timings for scoreboard search
public static final Timing distanceManagerTick = Timings.ofSafe("Distance Manager Tick"); // Tuinity - add timings for distance manager
+ // Purpur start
+ public static final Timing goalCleanup = Timings.ofSafe("PathfinderGoal - Cleanup");
@ -83,10 +83,10 @@ index 605bbf0174e60f795e445193a0284739ea452946..9a937623aaf59d3159038f06c1ede1a1
this.M();
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 26bbf2fc413e193507272d930e42e1ec9133abd7..9c14854a971a8818b7fe4acca7113c1e09ad32f0 100644
index 0170b2e877d4ef0b24a9c1e48da061e02cda2653..a1819225ea0c3ceb677877586c7b9176ffd36a4d 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2467,7 +2467,11 @@ public abstract class EntityLiving extends Entity {
@@ -2464,7 +2464,11 @@ public abstract class EntityLiving extends Entity {
}
}
@ -99,7 +99,7 @@ index 26bbf2fc413e193507272d930e42e1ec9133abd7..9c14854a971a8818b7fe4acca7113c1e
double d0 = this.locX() - this.lastX;
double d1 = this.locZ() - this.lastZ;
float f = (float) (d0 * d0 + d1 * d1);
@@ -2736,18 +2740,23 @@ public abstract class EntityLiving extends Entity {
@@ -2733,18 +2737,23 @@ public abstract class EntityLiving extends Entity {
this.setMot(d4, d5, d6);
this.world.getMethodProfiler().enter("ai");
@ -123,7 +123,7 @@ index 26bbf2fc413e193507272d930e42e1ec9133abd7..9c14854a971a8818b7fe4acca7113c1e
if (this.jumping && this.cS()) {
double d7;
@@ -2773,21 +2782,26 @@ public abstract class EntityLiving extends Entity {
@@ -2770,21 +2779,26 @@ public abstract class EntityLiving extends Entity {
} else {
this.jumpTicks = 0;
}
@ -196,10 +196,10 @@ index d3f0327a2a7cdedf3fe8d10df981a9f1cb378d26..cce7cac92b3256576fb35d5d03719b15
public final Stream<PathfinderGoalWrapped> getExecutingGoals() { return d(); } // Paper - OBFHELPER
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index d1dbb3cb4060819e1fb82d700cb7a909ba6c500b..7f64c327b8a55d33fdbaa0dec62c14a3d7962ad7 100644
index 8388629f573ff8ac4aea0b8fe6b041e293f70a2d..90b159db4e36d67e742dcfc92dbb56af7f9f9acb 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1325,7 +1325,9 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1337,7 +1337,9 @@ public class WorldServer extends World implements GeneratorAccessSeed {
return IRegistry.ENTITY_TYPE.getKey(entity1.getEntityType()).toString();
});
gameprofilerfiller.c("tickPassenger");

View File

@ -35,10 +35,10 @@ index 4f10ca5ada741b4f5ef941bb9d92a2fa6a7c44ff..7f2ee293a0206d01e44dfffe2a071471
if (enumdirection2 != EnumDirection.DOWN && world.isBlockFacePowered(blockposition1.shift(enumdirection2), enumdirection2)) {
return true;
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 9c14854a971a8818b7fe4acca7113c1e09ad32f0..3544033ad0f9e69fd8fdf0f76f96bc453354f675 100644
index a1819225ea0c3ceb677877586c7b9176ffd36a4d..2e879c7f95f2db5dd44e3e1c6879d4f12bf3d408 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2566,10 +2566,14 @@ public abstract class EntityLiving extends Entity {
@@ -2563,10 +2563,14 @@ public abstract class EntityLiving extends Entity {
}

View File

@ -0,0 +1,53 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Sat, 25 Jul 2020 17:16:18 +0200
Subject: [PATCH] Global Eula file
diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java
index 229c3b0f0c650b501f31147adaa17194af57fedd..703f90500188f037ec907cdb610aa86c7ed9ecf1 100644
--- a/src/main/java/net/minecraft/server/EULA.java
+++ b/src/main/java/net/minecraft/server/EULA.java
@@ -1,9 +1,11 @@
package net.minecraft.server;
+import java.io.File;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.file.Files;
import java.util.Properties;
+
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -15,12 +17,27 @@ public class EULA {
public EULA(java.nio.file.Path java_nio_file_path) {
this.b = java_nio_file_path;
- this.c = SharedConstants.d || this.b();
+ this.c = SharedConstants.d || globalEula() || this.b(this.b); // YAPFA
}
- private boolean b() {
+ // YAPFA start
+
+ private boolean globalEula() {
+ File globalEula = new File(System.getProperty("user.home"), "eula.txt");
+
+ if(globalEula.exists()) {
+ return b(globalEula.toPath());
+ } else {
+ System.out.println("No global eula found at " + globalEula.getAbsolutePath());
+ }
+ return false;
+ }
+
+ // YAPFA end
+
+ private boolean b(java.nio.file.Path path) { // YAPFA
try {
- InputStream inputstream = Files.newInputStream(this.b);
+ InputStream inputstream = Files.newInputStream(path);
Throwable throwable = null;
boolean flag;