Skip to content

Commit

Permalink
Update Paper
Browse files Browse the repository at this point in the history
  • Loading branch information
s-yh-china committed Nov 29, 2023
1 parent d7737eb commit 6a5557f
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ version=1.20.2-R0.1-SNAPSHOT
mcVersion=1.20.2
packageVersion=1_20_R2
org.gradle.jvmargs=-Xmx2G
paperRef=96d5e6ca481591842f44d05ab2451f943be6a7c7
paperRef=2182d4779289ee7dbb0e7510b0494716ec7e2cf4
preVersion=false
4 changes: 2 additions & 2 deletions patches/api/0009-Force-peaceful-mode-switch.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Force peaceful mode switch


diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 17d404d6d1a5b46b58d612fca38f17e71adee92e..cf83520291722436734914f348e32ae176d4ec51 100644
index f72f0f0f8eee95f95adc969d55ba7de82ee30e2a..aea2d7f973db8a061a37225937eb475ab7ba672b 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -4168,6 +4168,12 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@@ -4219,6 +4219,12 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@NotNull
public Set<FeatureFlag> getFeatureFlags();

Expand Down
10 changes: 5 additions & 5 deletions patches/server/0001-Build-changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Build changes


diff --git a/build.gradle.kts b/build.gradle.kts
index 79beac737c17412913983614bd478d33e3c6ed58..3774c310b30ccef71d5690829c04bd288d35c242 100644
index 64479f0a892d6847f987d844efe282a6080d607b..9109ec2f462ea8becae3dbe92a3bb36e8de6263e 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -13,8 +13,12 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) {
Expand Down Expand Up @@ -166,7 +166,7 @@ index 8f31413c939cc2b0454ad3d9a1b618dbae449d00..8ac996335015e5d494886f29921c4c33

public SystemReport fillSystemReport(SystemReport details) {
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index cf605aa56adf7f80d3b409f60a92a5ca7ae8fd07..749087baa24d6c07d09ef0f93fa6bde694d72a93 100644
index 1c9742ad81f04052d2c3bc18c7636f45b2fc5160..190d2fb23f2d7ef476a8051f1f0a86400f902652 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -217,11 +217,12 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
Expand All @@ -184,7 +184,7 @@ index cf605aa56adf7f80d3b409f60a92a5ca7ae8fd07..749087baa24d6c07d09ef0f93fa6bde6
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
this.setMotd(dedicatedserverproperties.motd);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 9c08303de2891de92e06de8a939a618b7a6f7321..1988a52030ee026b073ef3f98477dd9ec9827f1b 100644
index 356107688a5d40d1c462b164f61af82f4dfd3926..dc60dda029bd28dac7b31e2998d178e7f1453a81 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -269,7 +269,7 @@ import javax.annotation.Nullable; // Paper
Expand All @@ -197,10 +197,10 @@ index 9c08303de2891de92e06de8a939a618b7a6f7321..1988a52030ee026b073ef3f98477dd9e
private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft");
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 2af0068ef338634d1f44532af5db66c2d0b3dd10..2e7738ed88832c23033ca0396e80efad36a1a127 100644
index c737c5d62407337d3db2899cfc01713a058a6467..3c53be7f4cd162b8f7b808431ad36e7289e1aeb5 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -300,7 +300,7 @@ public class Main {
@@ -301,7 +301,7 @@ public class Main {
if (buildDate.before(deadline.getTime())) {
// Paper start - This is some stupid bullshit
System.err.println("*** Warning, you've not updated in a while! ***");
Expand Down
14 changes: 7 additions & 7 deletions patches/server/0002-Delete-Timings.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ index d10abd28c522612934aada8124e5bb67a9b4e9da..4a87d5d7f0bfa777ba311ac021d88784
i = this.context.runTopCommand(customfunction1, source);
} finally {
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 749087baa24d6c07d09ef0f93fa6bde694d72a93..8dbe0d3e867b3fa2478f2ad1e74e4763ff41d105 100644
index 190d2fb23f2d7ef476a8051f1f0a86400f902652..c19be54aa4294c6abce23761043f369f324a7a71 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -58,7 +58,6 @@ import org.apache.logging.log4j.Level;
Expand Down Expand Up @@ -1428,7 +1428,7 @@ index 8c33a12ca879c46893150d6adfb8aa4d397c6b4c..a8df45f925546dc584e32a4038eebc42
gameprofilerfiller.pop();
this.chunkMap.tick();
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 584a768f2ce1c98a1de7749060c47f21721f9055..2f6f2a5504d51cc9277233ce5d1ca0e2265ccb89 100644
index c88d5b9125f6ee43bf2be60fd1745d836f271b78..c3291b40ed73790a94db34efd683cfa2ca831989 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1,7 +1,6 @@
Expand Down Expand Up @@ -1737,7 +1737,7 @@ index 73871f456a85bda1e51f54986d0e61fb629822e8..7dbb55953ce9fb489c8a6706bc8a64fd
return this != EntityType.PLAYER && this != EntityType.LLAMA_SPIT && this != EntityType.WITHER && this != EntityType.BAT && this != EntityType.ITEM_FRAME && this != EntityType.GLOW_ITEM_FRAME && this != EntityType.LEASH_KNOT && this != EntityType.PAINTING && this != EntityType.END_CRYSTAL && this != EntityType.EVOKER_FANGS;
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index a76eb3d051db0229ed088b71c92ff3f131449007..6553e5a0e554b97667c0b66a63d88292007b7d6d 100644
index 87134e57a57df0fceda903e35d22f3f2de31adf3..aab9cc7bb9913f30161a78bfdf7e0258a5cabedf 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -142,7 +142,6 @@ import org.bukkit.event.entity.EntityTeleportEvent;
Expand Down Expand Up @@ -2019,10 +2019,10 @@ index fa170cc1ce7011d201295b89718292d696c7fc24..6b47cd3dfd0b7a9fc670522d8591e2f4
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 2e7738ed88832c23033ca0396e80efad36a1a127..9662af4ce6f76d1faeaa149acb6627fb63f22231 100644
index 3c53be7f4cd162b8f7b808431ad36e7289e1aeb5..6ba8a91ba676d371c286014d1474e949108c8dee 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -342,8 +342,8 @@ public class Main {
@@ -343,8 +343,8 @@ public class Main {
tryPreloadClass("org.jline.terminal.impl.MouseSupport");
tryPreloadClass("org.jline.terminal.impl.MouseSupport$1");
tryPreloadClass("org.jline.terminal.Terminal$MouseTracking");
Expand All @@ -2033,7 +2033,7 @@ index 2e7738ed88832c23033ca0396e80efad36a1a127..9662af4ce6f76d1faeaa149acb6627fb
tryPreloadClass("io.netty.channel.AbstractChannelHandlerContext");
tryPreloadClass("io.netty.channel.AbstractChannelHandlerContext$11");
tryPreloadClass("io.netty.channel.AbstractChannelHandlerContext$12");
@@ -356,7 +356,7 @@ public class Main {
@@ -357,7 +357,7 @@ public class Main {
tryPreloadClass("org.bukkit.craftbukkit.scheduler.CraftScheduler$1");
tryPreloadClass("org.bukkit.craftbukkit.scheduler.CraftScheduler$2");
tryPreloadClass("org.bukkit.craftbukkit.scheduler.CraftScheduler$3");
Expand All @@ -2043,7 +2043,7 @@ index 2e7738ed88832c23033ca0396e80efad36a1a127..9662af4ce6f76d1faeaa149acb6627fb
tryPreloadClass("org.slf4j.helpers.FormattingTuple");
tryPreloadClass("org.slf4j.helpers.BasicMarker");
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index 3ceb5d83be20183da907915f70ba9e64369373a9..8c9d7c0b1fe87d24e9f6cfb922454a7312f3ef91 100644
index 700932b65e4fda560d684b0aa079bcee3923f73e..74ff54724626908a083063c54983e0adfbbf7749 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -1,6 +1,5 @@
Expand Down
8 changes: 4 additions & 4 deletions patches/server/0005-Leaves-Server-Config-And-Command.patch
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ index 1a375701b6ba43825af59f1dcc966633459adf29..d6f913b7bc79d2ffaa994b60d4a8252a
org.spigotmc.WatchdogThread.hasStarted = true; // Paper
Arrays.fill( this.recentTps, 20 );
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 8dbe0d3e867b3fa2478f2ad1e74e4763ff41d105..76592ce972f8fa508ee22a7b572759e55082e6ee 100644
index c19be54aa4294c6abce23761043f369f324a7a71..e7df4b05736378b3cc437a07f072e98262a10477 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -219,6 +219,10 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
Expand Down Expand Up @@ -68,7 +68,7 @@ index b197d4c4a031c020e3994190f0c298809aef35a0..8ba39643a843a1df9bb22e5949cbee9e
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);

diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 1988a52030ee026b073ef3f98477dd9ec9827f1b..144956403df78cb98641351fefec630ccc1258fb 100644
index dc60dda029bd28dac7b31e2998d178e7f1453a81..a250171851caa2dea909869c2e58b814133ba291 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1041,6 +1041,7 @@ public final class CraftServer implements Server {
Expand Down Expand Up @@ -111,10 +111,10 @@ index 1988a52030ee026b073ef3f98477dd9ec9827f1b..144956403df78cb98641351fefec630c
@Override
public void restart() {
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 9662af4ce6f76d1faeaa149acb6627fb63f22231..78cea120756deb81422afc7af80f3d4eb60a8060 100644
index 6ba8a91ba676d371c286014d1474e949108c8dee..4169d2458f168da300946a2a64f192d3063fded6 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -165,6 +165,14 @@ public class Main {
@@ -166,6 +166,14 @@ public class Main {
.ofType(File.class)
.defaultsTo(new File("paper.yml"))
.describedAs("Yml file");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Add isShrink to EntityResurrectEvent


diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index afdea957ec8d893cea15a92fe40b19f0410da76a..441f52648143498a5122e5ca10dc48a17964b443 100644
index aab9cc7bb9913f30161a78bfdf7e0258a5cabedf..a03d8f8e6d025f997993a41e2a06f700aa1a1874 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1605,12 +1605,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -1613,12 +1613,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
}

org.bukkit.inventory.EquipmentSlot handSlot = (hand != null) ? org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(hand) : null;
Expand All @@ -23,7 +23,7 @@ index afdea957ec8d893cea15a92fe40b19f0410da76a..441f52648143498a5122e5ca10dc48a1
itemstack1.shrink(1);
}
if (itemstack != null && this instanceof ServerPlayer) {
@@ -4531,3 +4531,4 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -4539,3 +4539,4 @@ public abstract class LivingEntity extends Entity implements Attackable {

}
}
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0024-Optimize-suffocation.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize suffocation
This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish)

diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 79f56995e30dd0091a514d3f90603a83de0e754f..cbf0b393a996487cedb8eab5610647e795138f21 100644
index a03d8f8e6d025f997993a41e2a06f700aa1a1874..f9d13ba967b68b79590e5d562f6ebe42d69edd61 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -413,7 +413,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
Expand All @@ -18,7 +18,7 @@ index 79f56995e30dd0091a514d3f90603a83de0e754f..cbf0b393a996487cedb8eab5610647e7
this.hurt(this.damageSources().inWall(), 1.0F);
} else if (flag && !this.level().getWorldBorder().isWithinBounds(this.getBoundingBox())) {
double d0 = this.level().getWorldBorder().getDistanceToBorder(this) + this.level().getWorldBorder().getDamageSafeZone();
@@ -1400,6 +1400,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -1408,6 +1408,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
return this.getHealth() <= 0.0F;
}

Expand Down
4 changes: 2 additions & 2 deletions patches/server/0037-Cache-climbing-check-for-activation.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Subject: [PATCH] Cache climbing check for activation
This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish)

diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index e4123eecdee2bf6092355b0a019165d28d77ee5d..9e018eea8725a3d922d94a66510fceb71014c9ad 100644
index f9d13ba967b68b79590e5d562f6ebe42d69edd61..76952434d4d3632261df737ab9b66c1b01fa827d 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -2004,6 +2004,22 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -2012,6 +2012,22 @@ public abstract class LivingEntity extends Entity implements Attackable {
return this.lastClimbablePos;
}

Expand Down
6 changes: 3 additions & 3 deletions patches/server/0093-Reduce-array-allocations.patch
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ index b0517b9483a8cfd74997f89efdc0d8559b80ae4a..e7cfc98aa6dc19c5adad4c797ae7292a

for (int j = 0; j < i; ++j) {
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index aa6bf9361144679821adf1b090abcef34115d1fc..f836228eb76b53944c127d2e5b759d9e89b02699 100644
index 7e5712f0fffe2a8606c47bdfe4bfa5191aaf5bfc..3579766177a5ad627fef0ba27948e962d1140415 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -172,6 +172,7 @@ import org.bukkit.event.weather.LightningStrikeEvent;
Expand Down Expand Up @@ -398,10 +398,10 @@ index 2e324276ea4cd9e528c6a3f9a9ba394b378fe075..8d949983a30f27a60982f6b406151408
private EquipmentSlot(EquipmentSlot.Type type, int entityId, int armorStandId, String name) {
this.type = type;
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index f5695c4dd6f5192e8b11b87e22c41c40d4261f46..694c077ad1b0e748bc37520051da165250002c2b 100644
index 28f4271a6d89e770138e0dc3ee8833f059e79329..dba49ae89098798b3d74f71cf18f6937778faaaf 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3138,7 +3138,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3146,7 +3146,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@Nullable
private Map<EquipmentSlot, ItemStack> collectEquipmentChanges() {
Map<EquipmentSlot, ItemStack> map = null;
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0109-Force-peaceful-mode-switch.patch
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ index 7eec9dc8237ff04c53b573c3cc87e6cdbfdda7ed..2aafb872578d266f2826e5bddebc9b4a
boolean spawnThisTick = true;
int limit = enumcreaturetype.getMaxInstancesPerChunk();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 746f88db6b78b3c8ec372bfaacb26ec98f3b1163..8b290c8e0462ae1621dc71bc11cbd133f8c712ed 100644
index f19f2199cac5a7eb275f40cc23472416a40ec0da..559757fa8f3604a0803a7baf166772fd1520ba7c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2331,6 +2331,18 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -2358,6 +2358,18 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return CraftFeatureFlag.getFromNMS(this.getHandle().enabledFeatures()).stream().map(FeatureFlag.class::cast).collect(Collectors.toUnmodifiableSet());
}

Expand Down

0 comments on commit 6a5557f

Please sign in to comment.