First 1.19.3 build

This commit is contained in:
nostalgic853
2022-12-09 23:36:52 +08:00
parent 3b812b8324
commit ea29b2ca55
31 changed files with 1598 additions and 62 deletions

View File

@@ -4,7 +4,7 @@ plugins {
java
`maven-publish`
id("com.github.johnrengelman.shadow") version "7.1.2" apply false
id("io.papermc.paperweight.patcher") version "1.3.9"
id("io.papermc.paperweight.patcher") version "1.3.11"
}
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"

View File

@@ -1,7 +1,7 @@
group = cc.keyimc.keyi
version = 1.19.2-R0.1-SNAPSHOT
version = 1.19.3-R0.1-SNAPSHOT
purpurCommit = 86f2da583b1d84372cbca9a7dcfff45c287853ad
purpurCommit = 78e9a806d3fb2e17bf85f5457e2004a2478ed747
org.gradle.caching = true
org.gradle.parallel = true

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Maven publishing
diff --git a/build.gradle.kts b/build.gradle.kts
index 8e64ccdb928bc38cb703e60c8ec31339a6f6d894..d52ac51e072ac3c25ce426c2864584277f0c7fc8 100644
index 051b2db3548d1b24f591f05eece0c8241475e9bf..85e30cd20f0f8534724ce4e309e28ef0031f683c 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -153,3 +153,24 @@ tasks.check {
@@ -145,3 +145,24 @@ tasks.check {
dependsOn(scanJar)
}
// Paper end

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Player Skull API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index d54ba266d4dc772d844b1fffed0092a2d92e0eb1..ba8ac0aaa321d389b2186ad5d7c7759f7956723f 100644
index d13f8f7f5afb772514804ef78e2c704964c3cbd8..52dc40bc7cea12e657885b011a002cb89db00f33 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3,6 +3,9 @@ package org.bukkit.entity;
@@ -18,7 +18,7 @@ index d54ba266d4dc772d844b1fffed0092a2d92e0eb1..ba8ac0aaa321d389b2186ad5d7c7759f
import com.destroystokyo.paper.ClientOption; // Paper
import com.destroystokyo.paper.Title; // Paper
import net.kyori.adventure.text.Component;
@@ -3073,4 +3076,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -3071,4 +3074,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
void sendDeathScreen(@NotNull Component message, @Nullable Entity killer);
// Purpur end

View File

@@ -0,0 +1,24 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: nostalgic853 <yuu8583@proton.me>
Date: Fri, 9 Dec 2022 23:13:43 +0800
Subject: [PATCH] Revert "Spark Profiler"
This reverts commit 2f3f630834d34ee625be79fac6bc429d0e10d929.
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
index 2843545c6281da1f47e24431023c56e9592cef16..08f5892f175b898e3aa5cfc7de6639b818330927 100644
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -167,12 +167,6 @@ public final class SimplePluginManager implements PluginManager {
server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + file.getParentFile().getPath() + "'", ex); // Paper
continue;
}
- // Purpur start
- if (!Boolean.getBoolean("Purpur.IReallyDontWantSpark") && plugins.containsKey(description.getName()) && description.getName().equalsIgnoreCase("spark")) {
- server.getLogger().log(Level.INFO, "Purpur: Using user-provided spark plugin instead of our own.");
- continue;
- }
- // Purpur end
File replacedFile = plugins.put(description.getName(), file);
if (replacedFile != null) {

View File

@@ -9,10 +9,10 @@ Original license: MIT
Original project: https://github.com/Cryptite/Slice
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 9c2dcca0b6e34a3083226360575f0956a077d767..5ed16b78c39de21eff18a4824f84457a7c70fb58 100644
index 35bff85031b1e1b06af7d2bc1c76540d17ae3f3e..d13f8f7f5afb772514804ef78e2c704964c3cbd8 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2771,6 +2771,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2769,6 +2769,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
String getClientBrandName();
// Paper end

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Rebrand
diff --git a/build.gradle.kts b/build.gradle.kts
index 8ffc0d92ea29b95e5406ed81088ecf00e7679a97..96c012a57170fe1ec6954af7969b5c1371ea9ecf 100644
index 7de4b51cb4afdcbdfb8d1dc32f56252d997e23a8..3ffa404efaac294d60c8430266f47dcbfb6d1592 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -7,7 +7,7 @@ plugins {
@@ -14,10 +14,10 @@ index 8ffc0d92ea29b95e5406ed81088ecf00e7679a97..96c012a57170fe1ec6954af7969b5c13
dependencies {
- implementation(project(":purpur-api")) // Purpur
+ implementation(project(":keyi-api")) // Purpur // KeYi
// Pufferfish start
implementation("io.papermc.paper:paper-mojangapi:1.19.2-R0.1-SNAPSHOT") {
implementation("io.papermc.paper:paper-mojangapi:1.19.3-R0.1-SNAPSHOT") {
exclude("io.papermc.paper", "paper-api")
@@ -78,13 +78,13 @@ tasks.jar {
}
@@ -60,13 +60,13 @@ tasks.jar {
manifest {
val git = Git(rootProject.layout.projectDirectory.path)
val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim()
@@ -28,7 +28,7 @@ index 8ffc0d92ea29b95e5406ed81088ecf00e7679a97..96c012a57170fe1ec6954af7969b5c13
attributes(
"Main-Class" to "org.bukkit.craftbukkit.Main",
"Implementation-Title" to "CraftBukkit",
- "Implementation-Version" to "git-Purpur-$implementationVersion",// Purpur
- "Implementation-Version" to "git-Purpur-$implementationVersion", // Purpur
+ "Implementation-Version" to "git-KeYi-$gitBranch-$implementationVersion",// Purpur // KeYi
"Implementation-Vendor" to date, // Paper
"Specification-Title" to "Bukkit",
@@ -166,10 +166,10 @@ index fba5dbdb7bcbb55400ef18342c9b54612972a718..005983d56b283e54e2cf450f1e9f985a
private static int fetchDistanceFromSiteApi(int jenkinsBuild, @Nullable String siteApiVersion) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 2491785f5edd782b74189bef33eeffe13288f3da..3a67aaa39daf1fb86938f53e129aadfb686583b0 100644
index 80d4167edd7c87240ce02ae122153976015d548a..120b798742b1a4524eefa4b5387a8ffc203e523c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -249,7 +249,7 @@ import javax.annotation.Nullable; // Paper
@@ -262,7 +262,7 @@ import javax.annotation.Nullable; // Paper
import javax.annotation.Nonnull; // Paper
public final class CraftServer implements Server {
@@ -192,7 +192,7 @@ index fb87620c742ff7912f5e8ccd2a7930dd605576d9..d779212cbb719a1d923a24823135c5d3
if (stream != null) {
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index ccca392a45cb05abb55ddd5c6c36e6f9c7a5d171..f02a183fa2fd359456063b55c6c087e802c54f7b 100644
index 76cbfb7e900bf2698776f54cfe498f4b42965221..cd60f79acdd2307bdae48a11d4f5ec3ff3fa225a 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -244,7 +244,7 @@ public class PurpurConfig {

View File

@@ -240,12 +240,12 @@ index 0000000000000000000000000000000000000000..510eea6066fb0743a9c561eb577de9d9
+ }
+}
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index a029f51983bcfe49beab1359f282f0f957723ef2..ca0ddafe66dd5d02b1e96b1fc1c574490b68e6d4 100644
index 5b44f7512f21dba3f3306c7f42fa2d78e600847a..8fe0a9c2989016821ff673838c0041b38aff8fb2 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -239,6 +239,16 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
gg.pufferfish.pufferfish.PufferfishConfig.load(); // Pufferfish
gg.pufferfish.pufferfish.PufferfishCommand.init(); // Pufferfish
@@ -232,6 +232,16 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
// Paper end
// gg.pufferfish.pufferfish.PufferfishConfig.pufferfishFile = (java.io.File) options.valueOf("pufferfish-settings"); // Purpur
+ // KeYi start - init config
+ try {
@@ -261,7 +261,7 @@ index a029f51983bcfe49beab1359f282f0f957723ef2..ca0ddafe66dd5d02b1e96b1fc1c57449
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
this.setMotd(dedicatedserverproperties.motd);
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 8a4c8701122edf2f29edbe97e4fa199da2744e9e..ebf774da1f2614c0ecb00cf9260ba5a5ca676cb2 100644
index 72810905cc50af204161a02872d599af4aba8dbb..175d75a929d219f24c78cabe1558b4ebd22e1235 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -180,6 +180,14 @@ public class Main {

View File

@@ -10,13 +10,13 @@ Original code by YatopiaMC, licensed under MIT
You can find the original code on https://github.com/YatopiaMC/Yatopia
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index 1b7e38538881ba00ffdbe9226952627151532c5c..119e26e32654c834ff1158836ce56ba8985c09e8 100644
index 5a482f4c2a86d3f93fbbe8fc8fd29b07ebd50dc8..0b50301046234551c51b5ea9add450b6310ca73a 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -315,19 +315,21 @@ public abstract class Player extends LivingEntity {
@@ -308,19 +308,21 @@ public abstract class Player extends LivingEntity {
this.moveCloak();
if (!this.level.isClientSide) {
this.foodData.tick(this);
this.wardenSpawnTracker.tick();
- this.awardStat(Stats.PLAY_TIME);
- this.awardStat(Stats.TOTAL_WORLD_TIME);
- if (this.isAlive()) {

View File

@@ -14,10 +14,10 @@ doing questionable/buggy ones, and claiming breathtaking performance improvement
any of those Spigot forks!
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index dd13fc7cbf82948b1474ea33411e64b465608672..d0b001ec4265dda8d130122c2e946ea07f9aa3ac 100644
index 64b91d72fca05f2e74bcaf83bccf061a25a0c868..b0bb07c57e6219a21003bfce72b6909680ac78e5 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1196,7 +1196,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1163,7 +1163,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
this.tryCheckInsideBlocks();

View File

@@ -30,10 +30,10 @@ index bc9403d002ef24e71be67a962d099f5d73db9540..5582c15a37fbbf74d2039ba15d67684f
}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index a9c4f1192f53fea55b2f5edc8a91b6911489e2d3..5420915b21bbd17eeaba2ba45e08399a3abe6952 100644
index 8fe0a9c2989016821ff673838c0041b38aff8fb2..c2dab0da201010395b9367c8812115b34176fa36 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -185,7 +185,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@@ -180,7 +180,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
}
// Paper start - detect running as root
@@ -42,7 +42,7 @@ index a9c4f1192f53fea55b2f5edc8a91b6911489e2d3..5420915b21bbd17eeaba2ba45e08399a
DedicatedServer.LOGGER.warn("****************************");
DedicatedServer.LOGGER.warn("YOU ARE RUNNING THIS SERVER AS AN ADMINISTRATIVE OR ROOT USER. THIS IS NOT ADVISED.");
DedicatedServer.LOGGER.warn("YOU ARE OPENING YOURSELF UP TO POTENTIAL RISKS WHEN DOING THIS.");
@@ -326,10 +326,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@@ -319,10 +319,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
// CraftBukkit end
if (!this.usesAuthentication()) {
@@ -61,7 +61,7 @@ index a9c4f1192f53fea55b2f5edc8a91b6911489e2d3..5420915b21bbd17eeaba2ba45e08399a
DedicatedServer.LOGGER.warn("Whilst this makes it possible to use BungeeCord or Velocity, unless access to your server is properly restricted, it also opens up the ability for hackers to connect with any username they choose."); // Purpur
DedicatedServer.LOGGER.warn("Please see http://www.spigotmc.org/wiki/firewall-guide/ for further information.");
} else {
@@ -337,7 +342,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@@ -330,7 +335,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
DedicatedServer.LOGGER.warn("You will not be offered any support as long as the server allows offline-mode players to join."); // Purpur
}
// Spigot end

View File

@@ -21,10 +21,10 @@ index 8884a2471b4b7c5cabf1c0c767710ba69c7ae4ec..4f08f2e40f5bc3bc5a87bf3a34945afd
}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
index d7e102024b495067335fe008ec1649708f3a4016..f1aed20abb804c65b9c490e14f32f4074a32e893 100644
index ee5ec376cf7495ed99ee822a7b26978c3c107098..a85cef2b26cf876025c9436606eee24a3354f4da 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
@@ -296,7 +296,7 @@ public class ItemEntity extends Entity {
@@ -288,7 +288,7 @@ public class ItemEntity extends Entity {
ItemStack itemstack1 = other.getItem();
if (Objects.equals(this.getOwner(), other.getOwner()) && ItemEntity.areMergable(itemstack, itemstack1)) {

View File

@@ -7,10 +7,10 @@ Original code by YatopiaMC, licensed under MIT
You can find the original code on https://github.com/YatopiaMC/Yatopia
diff --git a/src/main/java/net/minecraft/server/Eula.java b/src/main/java/net/minecraft/server/Eula.java
index 920a0e6540bc8b8ce34dfaf57d58c200013b7b2c..94f05d32304f8a8c2aa294318617851adc55988d 100644
index 5528a4b7a67e0c257966c587437006004a2e1292..032e45e0addd89ad8b028803ea6d2135ffed5c05 100644
--- a/src/main/java/net/minecraft/server/Eula.java
+++ b/src/main/java/net/minecraft/server/Eula.java
@@ -16,12 +16,26 @@ public class Eula {
@@ -16,10 +16,24 @@ public class Eula {
public Eula(Path eulaFile) {
this.file = eulaFile;
@@ -35,8 +35,5 @@ index 920a0e6540bc8b8ce34dfaf57d58c200013b7b2c..94f05d32304f8a8c2aa294318617851a
+
+ private boolean readFile(java.nio.file.Path path) {
try {
- InputStream inputStream = Files.newInputStream(this.file);
+ InputStream inputStream = Files.newInputStream(path);
boolean var3;
try {
try (InputStream inputStream = Files.newInputStream(this.file)) {

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Do not save firework entities or the server may be laggy
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
index 61252ef8a79bac0ea2d3d231ec6b12166f39d072..ada4792000be638b19425e87e582ad257b147dd2 100644
index 5406925cd66f46ab8744123c670d72cea7bfc3a1..0b664dfef68b1e3905c9d8451602abf9cd9eafe6 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
@@ -358,4 +358,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Disable arrow despawn counter by default
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index bb352ed86e4047e38ad27900f72fc0ddb741bf71..2cc8eeedfd5729fd324b10cb4b2a6298dad39e9d 100644
index 856024f31ca1eeab6e4d4ee7f547509bc9581bf8..d73914f406012af602232ca47e7ed0e627b564c6 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -116,7 +116,7 @@ public class PurpurWorldConfig {

View File

@@ -7,10 +7,10 @@ Original code by PatinaMC, licensed under GNU General Public License v3.0
You can find the original code on https://github.com/PatinaMC/Patina
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 2162082984f343b31a3800811a1bb8e0b1dc6e41..7210ec5ac726b615b0373dc551c915f6b1bf5848 100644
index 7f2a811505c2aeaad6e1a91a0719613a6694f77a..6890e3598d769d6dbfb5b665153b17cb5493a84a 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -387,7 +387,7 @@ public class ServerPlayer extends Player {
@@ -398,7 +398,7 @@ public class ServerPlayer extends Player {
long l = k * k;
int i1 = l > 2147483647L ? Integer.MAX_VALUE : (int) l;
int j1 = this.getCoprime(i1);
@@ -19,7 +19,7 @@ index 2162082984f343b31a3800811a1bb8e0b1dc6e41..7210ec5ac726b615b0373dc551c915f6
for (int l1 = 0; l1 < i1; ++l1) {
int i2 = (k1 + j1 * l1) % i1;
@@ -424,7 +424,7 @@ public class ServerPlayer extends Player {
@@ -435,7 +435,7 @@ public class ServerPlayer extends Player {
long l = k * k;
int i1 = l > 2147483647L ? Integer.MAX_VALUE : (int) l;
int j1 = this.getCoprime(i1);

View File

@@ -9,7 +9,7 @@ Original code by RelativityMC, licensed under MIT
You can find the original code on https://github.com/RelativityMC/VMP-fabric (Yarn mappings)
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index d0b001ec4265dda8d130122c2e946ea07f9aa3ac..9a9d2e4cf955da26edc3b20d567294b2b2775ac4 100644
index b0bb07c57e6219a21003bfce72b6909680ac78e5..6f9c8bfea4ef60aec040064ce976bb1f03770d04 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -399,6 +399,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -20,7 +20,7 @@ index d0b001ec4265dda8d130122c2e946ea07f9aa3ac..9a9d2e4cf955da26edc3b20d567294b2
public void setOrigin(@javax.annotation.Nonnull Location location) {
this.origin = location.toVector();
@@ -1036,6 +1037,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1003,6 +1004,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
// Paper end - detailed watchdog information
public void move(MoverType movementType, Vec3 movement) {
@@ -34,7 +34,7 @@ index d0b001ec4265dda8d130122c2e946ea07f9aa3ac..9a9d2e4cf955da26edc3b20d567294b2
// Paper start - detailed watchdog information
io.papermc.paper.util.TickThread.ensureTickThread("Cannot move an entity off-main");
synchronized (this.posLock) {
@@ -3797,6 +3805,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3804,6 +3812,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
public final void setBoundingBox(AABB boundingBox) {

View File

@@ -11,7 +11,7 @@ This is a fully vanilla optimization. Improves: [Blast]Furnace/Campfire/Smoker/S
This was mostly made for the auto crafting table, since the performance boost is much more visible while using that mod
diff --git a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
index 4872f70977e73c889fe6e2339d00ebc64459613d..7f6bd5fb335ea33c52d510461a1f17371c36576a 100644
index 2f712bfc1f717ba410bf34669d7b0a919ca218cc..fa7f4c3e14aa4ec11187f7c0f96cb4504ee38547 100644
--- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
+++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
@@ -11,14 +11,7 @@ import com.google.gson.JsonParseException;

View File

@@ -424,7 +424,7 @@ index e5ea9f27a1936ed9e329e74317c91c5df89b9fbd..89a41d396162a1c2eb2df5192b0d888b
private long lastFill = -1;
private long nextRefill = -1;
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index e0e4a924e926b086699998095a1abddd01d8c002..f55584f7255012599fdce018b85e2e21e4660849 100644
index 09e357833f9bbe26da7fa7142875daf2733d6420..2850b4fac2bf28b751cd6412e2effb99c60a3d74 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -53,6 +53,10 @@ import net.minecraft.world.level.material.Fluids;
@@ -438,9 +438,9 @@ index e0e4a924e926b086699998095a1abddd01d8c002..f55584f7255012599fdce018b85e2e21
public class LevelChunk extends ChunkAccess {
@@ -932,7 +936,7 @@ public class LevelChunk extends ChunkAccess {
@@ -919,7 +923,7 @@ public class LevelChunk extends ChunkAccess {
if (this.needsDecoration) {
try (co.aikar.timings.Timing ignored = this.level.timings.chunkLoadPopulate.startTiming()) { // Paper
//try (co.aikar.timings.Timing ignored = this.level.timings.chunkLoadPopulate.startTiming()) { // Paper // Purpur
this.needsDecoration = false;
- java.util.Random random = new java.util.Random();
+ Random random = new FastRandom();
@@ -469,10 +469,10 @@ index dcfe090c269d4cbcc2eb1b6f85392848bb34656c..ef8909c9c13c8f46ec6d452f0d14c9a1
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 41fafd4a1583e748d763439e8838739ec1ff8e1d..48c35afdbb8b08dbc1279bc57ea44bccb65b2a8a 100644
index 069bb67d1f79e63dce85cba347a1fd67a4781043..840657e9fa7adaa20753b54d86a68d83e5b0eaf1 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -135,6 +135,7 @@ import org.bukkit.util.Consumer;
@@ -134,6 +134,7 @@ import org.bukkit.util.Consumer;
import org.bukkit.util.RayTraceResult;
import org.bukkit.util.StructureSearchResult;
import org.bukkit.util.Vector;
@@ -480,7 +480,7 @@ index 41fafd4a1583e748d763439e8838739ec1ff8e1d..48c35afdbb8b08dbc1279bc57ea44bcc
public class CraftWorld extends CraftRegionAccessor implements World {
public static final int CUSTOM_DIMENSION_OFFSET = 10;
@@ -227,7 +228,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -226,7 +227,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
}
// Paper end
@@ -507,10 +507,10 @@ index d1c7ab67cba881d96b7a5e9220130d86d0514304..309d1ce15aace9da4a84819e8511af2c
public CraftFirework(CraftServer server, FireworkRocketEntity entity) {
diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
index 23b1725679d195380a902a3b03c6b6ad3aaede19..d554bd8e2fbaab8ee4a770563396544d5f447319 100644
index a9673a804d597599c35c83f4f245510c83005328..08d47eee550e2e9ddfb4dc0ce12945401b16c23c 100644
--- a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
+++ b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
@@ -40,13 +40,14 @@ import org.bukkit.craftbukkit.util.RandomSourceWrapper;
@@ -42,13 +42,14 @@ import org.bukkit.craftbukkit.util.RandomSourceWrapper;
import org.bukkit.generator.ChunkGenerator;
import org.bukkit.generator.ChunkGenerator.BiomeGrid;
import org.bukkit.generator.ChunkGenerator.ChunkData;

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Player Skull API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 965dabe484bf6276497389656e12d0363fb6513f..77c877118517717a6abf386d104b2c81094ae52a 100644
index 82697576db752e3dad908e389035ec66c728f0ec..d41d91914b8e7b29b7f92692faa9f7a5a5cbd080 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -26,6 +26,9 @@ import java.util.Optional;
@@ -18,7 +18,7 @@ index 965dabe484bf6276497389656e12d0363fb6513f..77c877118517717a6abf386d104b2c81
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.Nullable;
@@ -144,6 +147,7 @@ import org.bukkit.event.player.PlayerUnregisterChannelEvent;
@@ -146,6 +149,7 @@ import org.bukkit.event.player.PlayerUnregisterChannelEvent;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.InventoryView.Property;
import org.bukkit.inventory.ItemStack;

View File

@@ -10,10 +10,10 @@ this patch is focused around the sensors used for ai
delete the line of sight cache less often and use a faster nearby comparison
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index f23829690d2be20af50256e4d985e3e342415d54..995fc228430ac6c8af8654aa1137c7f66668f622 100644
index ee87227269b36ff758dceb8dcf20b9367470d6df..01168bb3727399cac73fbf8aa9ae2316a702586d 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1026,20 +1026,22 @@ public abstract class LivingEntity extends Entity {
@@ -1027,23 +1027,25 @@ public abstract class LivingEntity extends Entity {
}
if (entity != null) {
@@ -35,16 +35,20 @@ index f23829690d2be20af50256e4d985e3e342415d54..995fc228430ac6c8af8654aa1137c7f6
+ else if (entitytypes == EntityType.CREEPER && this.getItemBySlot(EquipmentSlot.HEAD).is(Items.CREEPER_HEAD)) {
d0 *= entity.level.purpurConfig.creeperHeadVisibilityPercent;
}
- else if ((entitytypes == EntityType.PIGLIN || entitytypes == EntityType.PIGLIN_BRUTE) && itemstack.is(Items.PIGLIN_HEAD)) {
+ else if ((entitytypes == EntityType.PIGLIN || entitytypes == EntityType.PIGLIN_BRUTE) && this.getItemBySlot(EquipmentSlot.HEAD).is(Items.PIGLIN_HEAD)) {
d0 *= entity.level.purpurConfig.piglinHeadVisibilityPercent;
}
// Purpur end
+ // petal end
// Purpur start
if (entity instanceof LivingEntity entityliving) {
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index bc18c166ca776b0ef6e816eb034e410c391258b6..e68533ff29c882e955c150130e3260584cc250b0 100644
index db23506c44de328c74eb509caf6cc4d8d91cbc52..caf2fc594bc5143e8ead8c574963224f63b3bc7a 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -884,10 +884,10 @@ public abstract class Mob extends LivingEntity {
@@ -900,10 +900,10 @@ public abstract class Mob extends LivingEntity {
return;
}
// Paper end

View File

@@ -0,0 +1,51 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: nostalgic853 <yuu8583@proton.me>
Date: Fri, 9 Dec 2022 23:09:09 +0800
Subject: [PATCH] Revert "Spark Profiler"
This reverts commit 00657e75cfec6d86bbdcb1126aabcf7177bec31a.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 120b798742b1a4524eefa4b5387a8ffc203e523c..5e56cc967f09fc29f1fa4976765a8a837e3087cf 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -448,38 +448,7 @@ public final class CraftServer implements Server {
if (!pluginFolder.exists()) {
pluginFolder.mkdirs();
}
- // Purpur start
- List<File> extraJars = this.extraPluginJars();
- if (!Boolean.getBoolean("Purpur.IReallyDontWantSpark")) {
- try {
- File file = new File("cache", "spark.jar");
- file.getParentFile().mkdirs();
-
- boolean shouldDownload = true;
- if (file.exists()) {
- String fileSha1 = String.format("%040x", new java.math.BigInteger(1, java.security.MessageDigest.getInstance("SHA-1").digest(java.nio.file.Files.readAllBytes(file.toPath()))));
- String sparkSha1;
- try (java.io.BufferedReader reader = new java.io.BufferedReader(new InputStreamReader(new java.net.URL("https://sparkapi.lucko.me/download/bukkit/sha1").openStream()))) {
- sparkSha1 = reader.lines().collect(Collectors.joining(""));
- }
-
- if (fileSha1.equals(sparkSha1)) {
- shouldDownload = false;
- }
- }
-
- if (shouldDownload) {
- java.nio.file.Files.copy(new java.net.URL("https://sparkapi.lucko.me/download/bukkit").openStream(), file.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING);
- }
-
- extraJars.add(file);
- } catch (Exception e) {
- getLogger().severe("Purpur: Failed to download and install spark plugin");
- e.printStackTrace();
- }
- }
- Plugin[] plugins = this.pluginManager.loadPlugins(pluginFolder, extraJars);
- // Purpur end
+ Plugin[] plugins = this.pluginManager.loadPlugins(pluginFolder, this.extraPluginJars());
// Paper end
for (Plugin plugin : plugins) {
try {

File diff suppressed because it is too large Load Diff