Skip to content

Commit

Permalink
update patches
Browse files Browse the repository at this point in the history
  • Loading branch information
foss-mc committed Feb 10, 2024
1 parent 14bd6f0 commit 7c64322
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 50 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ group = patina.patina

version = 1.20.4-R0.1-SNAPSHOT
mcVersion = 1.20.4
paperRef = b3c81089ae26cc3ad2e7388c7b64457f3f83c98a
paperRef = 581fb30a4c80a8b10e41ddb0801747da53f57e62

org.gradle.parallel = true
org.gradle.caching = true
Expand Down
6 changes: 3 additions & 3 deletions patches/api/0004-Suspected-plugins-report.patch
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ index 899d67fa782fac639fe7fb096e05c551d75bd647..0de79dca263c58f9a6a1c6707e90452d
+ // Yatopia end
}
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
index 5cd236965de12392d8c7aa81307c0ff1cc8673b1..d91399ed743de3a3441f98c3c38a294c659dc0bc 100644
index 34037d3da2c536bac088e0ff629ee8f1daccc65b..c946eb6d60f13c7f5eeac77ccace7fa26f710cf5 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
@@ -121,7 +121,7 @@ public abstract class JavaPlugin extends PluginBase {
@@ -126,7 +126,7 @@ public abstract class JavaPlugin extends PluginBase {
* @return File containing this plugin
*/
@NotNull
Expand Down Expand Up @@ -110,7 +110,7 @@ index 301e82369603f3dd6e6c1bd380da4bacacd7ef6c..7573bda5d8a409d82bcd4baf77cff8df
+ // Yatopia end
}
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
index 90953bfc81168068a281be4d2d3942d5e7dd69ff..74c01f29ac3d0a8fb5c047f1dea54d77425ce0a4 100644
index 12449e18180d604e9cbbc744da74a8b222a18e1f..b7e94298f8d29d1a2ad0b7b79e4e601e51699e93 100644
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
@@ -323,4 +323,13 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2303,7 +2303,7 @@ index a6f58b3457b7477015c5c6d969e7d83017dd3fa1..a27ee205d13dda890646ebf451076f38
}
}
diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
index 1ccf71be865af4d3c5ab8f4323a228a947e0bf3f..3f3f8443563e4ca6c7fb236e7a98eaae3be3b43e 100644
index 850f75172e9efa72cabb8e5bd124b96a0b1a945f..3db1de70c76e1427e257d988d1a7f26e986b5617 100644
--- a/src/main/java/io/papermc/paper/util/MCUtil.java
+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
@@ -212,7 +212,7 @@ public final class MCUtil {
Expand All @@ -2329,7 +2329,7 @@ index ba12919c3f9aec34a9e64993b143ae92be5eb172..9efeab9078e2d08903e482718b840797
} else {
this.lastTimeStamp = body.timeStamp();
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 90ae7e8c81f6a9ede8aeaeec3bf784023522cefc..cefc05ddb198bff00924f038b39195a5b9ccb05d 100644
index d06185566b447c432d4dc2e3ba04d121bcdbc71b..3f77a3fac2db453b9036597e4fdfee20a574b2b8 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -312,6 +312,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
Expand Down Expand Up @@ -2561,7 +2561,7 @@ index 529ab44baaf573b97cf7e89560c548642733188f..db55ad9aaabfa1ea998754f3ac352d16
this.wasOnGround = this.entity.onGround();
this.teleportDelay = 0;
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 6934e9dac0d69c043b73b7c46d59f2d39b37c67f..dbe612427b894df9da1335b94163ba9b89b090c0 100644
index 6934e9dac0d69c043b73b7c46d59f2d39b37c67f..1f1e1ec9c9ef05a48b9db1cf2c5613928d28ad81 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -894,6 +894,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
Expand All @@ -2586,7 +2586,7 @@ index 6934e9dac0d69c043b73b7c46d59f2d39b37c67f..dbe612427b894df9da1335b94163ba9b
+ // Paper start - Prevent tile entity and entity crashes
+ final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level().getWorld().getName(), entity.getX(), entity.getY(), entity.getZ());
+ MinecraftServer.LOGGER.error(msg, throwable);
+ getCraftServer().getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerInternalException(msg, throwable)));
+ getCraftServer().getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerInternalException(msg, throwable))); // Paper - ServerExceptionEvent
+ entity.discard();
+ // Paper end
+ }
Expand Down Expand Up @@ -2617,10 +2617,10 @@ index 6934e9dac0d69c043b73b7c46d59f2d39b37c67f..dbe612427b894df9da1335b94163ba9b

if (this.isRainingAt(blockposition)) {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 8ca5d7c1bfacb1b47aa680eee167af08d0396ae0..dbcf025c07abafee639d8b94bf963962b5e85478 100644
index a7e40f72a3b56916620a7f089410ec3a6db0cffc..e54816e2a5145b1ef1ca72b470498b419a659f48 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1121,6 +1121,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1139,6 +1139,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

@Override
public void handleEditBook(ServerboundEditBookPacket packet) {
Expand Down Expand Up @@ -2741,7 +2741,7 @@ index d6cbe98e67fdbf8db46338a88ab1356dd63b50a3..20dd3a63b2f955b05a75eb240e33ae4c
int LARGE_MAX_STACK_SIZE = 64;
int DEFAULT_DISTANCE_LIMIT = 8;
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 2c06f3ebf7e1069727387bfc60db30c958c14b5a..1d9331fe9ce7308eda2e7da2ae726810d455f090 100644
index 9ee1e3da1cb16291ff3e37829e25227a6b97a177..e987a9142b577ebe3fabcda87df8bc066e859122 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -308,7 +308,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
Expand Down Expand Up @@ -2884,7 +2884,7 @@ index 2c06f3ebf7e1069727387bfc60db30c958c14b5a..1d9331fe9ce7308eda2e7da2ae726810
if (vec3d.length() > 0.0D) {
if (k1 > 0) {
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
index edc723ea5ca3a325106e7af38c60dbf9f0f5fb77..ab6cd363231a668c9b16df825a72d3205746ee49 100644
index 09e8445a3f8c6b3ebc852a75a9a25b41a51ba659..dc11683ee4d8a6b7a1c42bcae36dc6e8105cd994 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
@@ -305,6 +305,8 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
Expand All @@ -2897,18 +2897,18 @@ index edc723ea5ca3a325106e7af38c60dbf9f0f5fb77..ab6cd363231a668c9b16df825a72d320
private String descriptionId;
@Nullable
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 6071451339080bbdd98fb634791a56988984c8bc..5641bc7f50cef7819ddaeb76a4a4f9c80f473d31 100644
index 6523795e715e5d472739e9bc6433143115c3de8f..317ff325f0a30d9ed83d3049cf96c53838c050ee 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;
@@ -141,7 +141,6 @@ import org.bukkit.event.entity.EntityTeleportEvent;
import org.bukkit.event.player.PlayerItemConsumeEvent;
// CraftBukkit end

-import co.aikar.timings.MinecraftTimings; // Paper

public abstract class LivingEntity extends Entity implements Attackable {

@@ -413,7 +412,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -412,7 +411,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
boolean flag = this instanceof net.minecraft.world.entity.player.Player;

if (!this.level().isClientSide) {
Expand Down Expand Up @@ -2937,7 +2937,7 @@ index 6071451339080bbdd98fb634791a56988984c8bc..5641bc7f50cef7819ddaeb76a4a4f9c8
@Override
public boolean hurt(DamageSource source, float amount) {
if (this.isInvulnerableTo(source)) {
@@ -2002,6 +2014,20 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -2003,6 +2015,20 @@ public abstract class LivingEntity extends Entity implements Attackable {
return this.lastClimbablePos;
}

Expand All @@ -2959,7 +2959,7 @@ index 6071451339080bbdd98fb634791a56988984c8bc..5641bc7f50cef7819ddaeb76a4a4f9c8
if (this.isSpectator()) {
return false;
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 24629412d2b4acaa81788ce70412b03387cc777c..a181a298334212847166409a2121476ba5871cb2 100644
index 209090870e1a4aa2f59cfa2e29419dbcc9665635..195c86a52b1757c7aadf45babc52bfef58de1dc3 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -221,14 +221,16 @@ public abstract class Mob extends LivingEntity implements Targeting {
Expand Down Expand Up @@ -3520,10 +3520,10 @@ index 27b0a79f7a7c47047216aae42944bac2a2151181..a097cfc528f709c80575f35483b68783
autorecipestackmanager.initialize(this); // Paper - better exact choice recipes
int i = 0;
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 8f437225d2a4e08ca47873cd42277d9f0f9f5529..c10efc14ca83f07b27a2f12776ab2fd2a953c5a1 100644
index 19f23a6c8fb5c02843c27fb8a242ec9d0d1b538b..fe063e4c3ff0b20f3d0c2c92eebdaf0101bac7d7 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -211,6 +211,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -206,6 +206,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// Paper end - Use getChunkIfLoadedImmediately

public abstract ResourceKey<LevelStem> getTypeKey();
Expand All @@ -3532,7 +3532,7 @@ index 8f437225d2a4e08ca47873cd42277d9f0f9f5529..c10efc14ca83f07b27a2f12776ab2fd2

protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - create paper world config; Async-Anti-Xray: Pass executor
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
@@ -1313,14 +1315,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -1308,13 +1310,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
try {
tickConsumer.accept(entity);
MinecraftServer.getServer().executeMidTickTasks(); // Paper - execute chunk tasks mid tick
Expand All @@ -3542,15 +3542,13 @@ index 8f437225d2a4e08ca47873cd42277d9f0f9f5529..c10efc14ca83f07b27a2f12776ab2fd2
// Paper start - Prevent block entity and entity crashes
final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level().getWorld().getName(), entity.getX(), entity.getY(), entity.getZ());
MinecraftServer.LOGGER.error(msg, throwable);
getCraftServer().getPluginManager().callEvent(new ServerExceptionEvent(new ServerInternalException(msg, throwable))); // Paper - ServerExceptionEvent
getCraftServer().getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerInternalException(msg, throwable))); // Paper - ServerExceptionEvent
- entity.discard();
- // Paper end - Prevent block entity and entity crashes
+ entity.discard(); // Pufferfish - diff on change ServerLevel.tick
+ // Paper end
// Paper end - Prevent block entity and entity crashes
}
}
// Paper start - Option to prevent armor stands from doing entity lookups
@@ -1793,6 +1795,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -1788,6 +1790,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
}

public ProfilerFiller getProfiler() {
Expand All @@ -3559,10 +3557,10 @@ index 8f437225d2a4e08ca47873cd42277d9f0f9f5529..c10efc14ca83f07b27a2f12776ab2fd2
}

diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
index 17e9f3a30e287faf210e08dc7eb177a70f049f43..96fc603c2fccc1d9610248b2116d35696bc65e4e 100644
index da7489986848316fed029b71d1bc4e1248c9c9a8..661acdf4b1f33d150b0caf179e925d3162d7be35 100644
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
@@ -429,12 +429,12 @@ public final class NaturalSpawner {
@@ -425,12 +425,12 @@ public final class NaturalSpawner {
}
}

Expand Down Expand Up @@ -4094,10 +4092,10 @@ index ebe65474a4a05ff1637d7f37ebcfe690af59def5..42142c512b12e5b269c19f1e821c50e7

@Nullable
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 34cd96dba5f11e64d7c90f4246b513b0ea943aa6..970b25f6064da694b076a08a8bbcc01e03d354d8 100644
index 14d3986ae6ec721f07dc82b37d62d3bea484ad15..006b92521be9f24deccdae06b787746a004a6e42 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1120,6 +1120,11 @@ public final class CraftServer implements Server {
@@ -1125,6 +1125,11 @@ public final class CraftServer implements Server {
plugin.getPluginMeta().getDisplayName(),
"This plugin is not properly shutting down its async tasks when it is being shut down. This task may throw errors during the final shutdown logs and might not complete before process dies."
));
Expand All @@ -4122,7 +4120,7 @@ index 96d772eb02f79f8c478f5e6f065e387aa7665b18..c5ce412f321b8b4f31cc042893659e21
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/MinecraftInternalPlugin.java b/src/main/java/org/bukkit/craftbukkit/scheduler/MinecraftInternalPlugin.java
index d96399e9bf1a58db5a4a22e58abb99e7660e0694..eb19f679ee498e51d02fe9a961cf02699cf75848 100644
index 66bdac50130f523f9dc4379b103b7a469f9ca36b..ef780e0566dbac07da88ba26dc595b49c8ff5ab3 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/MinecraftInternalPlugin.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/MinecraftInternalPlugin.java
@@ -22,7 +22,8 @@ public class MinecraftInternalPlugin extends PluginBase {
Expand Down
Loading

0 comments on commit 7c64322

Please sign in to comment.