Skip to content

Commit

Permalink
update paper
Browse files Browse the repository at this point in the history
  • Loading branch information
foss-mc committed Nov 21, 2023
1 parent 8dfa7c7 commit 809a1d2
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 40 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.2-R0.1-SNAPSHOT
mcVersion = 1.20.2
paperRef = 230682d51bc4078ee676751552cac56864e21b30
paperRef = 250388defed6660c57f40733c318ac90b846c264

org.gradle.parallel = true
org.gradle.caching = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Purpur config files
Lagging threshold

diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index f78b5fd3c3347d28da58777bff88903d2eb140f6..6e1b3d5182f9950b70b476f0956987d03ba67d6d 100644
index 884902cb7f86c0b56594ccafc7d05c6c7a23ab53..c3823b56d5f9c6e729f784c06e0609d346c41472 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -2756,4 +2756,15 @@ public final class Bukkit {
@@ -2832,4 +2832,15 @@ public final class Bukkit {
public static Server.Spigot spigot() {
return server.spigot();
}
Expand All @@ -29,10 +29,10 @@ index f78b5fd3c3347d28da58777bff88903d2eb140f6..6e1b3d5182f9950b70b476f0956987d0
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 8d8fe04e6b09d2a5b1cc05002073df5c58cdcb96..dc4f29b05c3191fa00ed5f0b3628a14416b1f9b9 100644
index d0c634629aa0b6bac0da93655dd86ad3aea0ce30..3c5edcafdbdaac0abd2cd99e55d4addc56702fa2 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -2121,6 +2121,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@@ -2190,6 +2190,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
}
// Paper end

Expand All @@ -51,7 +51,7 @@ index 8d8fe04e6b09d2a5b1cc05002073df5c58cdcb96..dc4f29b05c3191fa00ed5f0b3628a144
/**
* Sends the component to the player
*
@@ -2404,4 +2416,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@@ -2473,4 +2485,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
*/
boolean isOwnedByCurrentRegion(@NotNull Entity entity);
// Paper end - Folia region threading API
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2293,7 +2293,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 d02546b18cb689724887b4e85e8d32a18828a4ad..91eaff58bb422ba188e6cfaa9c20b45bec211edd 100644
index 8240bb085b619f257f8c0a25775e0b15068e440f..6d9668d993bb922ae9d2b76a4d766903cc3f98a4 100644
--- a/src/main/java/io/papermc/paper/util/MCUtil.java
+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
@@ -213,7 +213,7 @@ public final class MCUtil {
Expand Down Expand Up @@ -2327,7 +2327,7 @@ index 8f31413c939cc2b0454ad3d9a1b618dbae449d00..370e860c590fe2e7c17ccd69cdee5f47
}

diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 2b5d82fbf4e7ec32d0c53dd3e8207b1dba708bbd..462c4eb3c06779f86f66778e9578d3d8f06c3294 100644
index 1c9742ad81f04052d2c3bc18c7636f45b2fc5160..e5c955e7e99bc07199feabfe9f0301016ad38b84 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -221,6 +221,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
Expand Down Expand Up @@ -2546,7 +2546,7 @@ index 35674f92a67f93382103c2766df4b678ba5c862f..d46e61640b241d32df05240dedd2c23f
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 584a768f2ce1c98a1de7749060c47f21721f9055..c4a22fab14c74f268e8452c398add4323e1f09e7 100644
index c88d5b9125f6ee43bf2be60fd1745d836f271b78..945783d090e44ebed1d4968c1d1ec0b68f6d494f 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -878,6 +878,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
Expand Down Expand Up @@ -2602,18 +2602,18 @@ index 584a768f2ce1c98a1de7749060c47f21721f9055..c4a22fab14c74f268e8452c398add432

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 33be0db006cca66f38f2105924466b0210139848..2061f374a2b40ff5ba3e3bdb6ef02bbec3be9748 100644
index 65bb221993147a558995b36fb835f7b82e0eb4bd..6cc9271ba058f4af759eae34e2f6e9f892b4f6da 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1118,6 +1118,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1119,6 +1119,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

@Override
public void handleEditBook(ServerboundEditBookPacket packet) {
+ if (!gg.pufferfish.pufferfish.PufferfishConfig.enableBooks && !this.player.getBukkitEntity().hasPermission("pufferfish.usebooks")) return; // Pufferfish
// Paper start
if (!this.cserver.isPrimaryThread()) {
List<String> pageList = packet.getPages();
@@ -2273,6 +2274,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2274,6 +2275,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}

private boolean updateChatOrder(Instant timestamp) {
Expand Down Expand Up @@ -2734,7 +2734,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 d435d04ab50b2f64e6438c6c26639b6048322013..0d364a6fdcc00fbb1e9a013149f8c40a711613c7 100644
index c655c6fee393c62ba79301f76baa72f9b1154a9a..c5a5e6aa4f512b8343a7cac6bd9ab8b72fa4adb4 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -306,7 +306,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
Expand Down Expand Up @@ -2772,7 +2772,7 @@ index d435d04ab50b2f64e6438c6c26639b6048322013..0d364a6fdcc00fbb1e9a013149f8c40a
this.baseTick();
}

@@ -4357,16 +4369,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -4336,16 +4348,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}

public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tag, double speed) {
Expand All @@ -2798,7 +2798,7 @@ index d435d04ab50b2f64e6438c6c26639b6048322013..0d364a6fdcc00fbb1e9a013149f8c40a
double d1 = 0.0D;
boolean flag = this.isPushedByFluid();
boolean flag1 = false;
@@ -4374,14 +4388,61 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -4353,14 +4367,61 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
int k1 = 0;
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();

Expand Down Expand Up @@ -2866,7 +2866,7 @@ index d435d04ab50b2f64e6438c6c26639b6048322013..0d364a6fdcc00fbb1e9a013149f8c40a

if (d2 >= axisalignedbb.minY) {
flag1 = true;
@@ -4403,9 +4464,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -4382,9 +4443,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
// CraftBukkit end
}
}
Expand All @@ -2893,7 +2893,7 @@ index 73871f456a85bda1e51f54986d0e61fb629822e8..2561e74ffdf595a9b6ae13dcd738662c
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 675d695989cef5d8fc2e85673efbb57ec1bb38bd..26b57d004cf9b43967dce65c75946895fb703b84 100644
index a76eb3d051db0229ed088b71c92ff3f131449007..d6d86597fbca937a32e74ecb913f569f9740e7d8 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 @@ -2955,7 +2955,7 @@ index 675d695989cef5d8fc2e85673efbb57ec1bb38bd..26b57d004cf9b43967dce65c75946895
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 d28c477171c1b6888a45175075017d960464b5cd..4cb836dfa7cbd2e634d4a3a567da0305aac0da4d 100644
index 956d05e2ae59978ea9623ca0e167c0afe0b87306..944c22ea172796492a683d2f2bddfb0938d7a8c9 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -220,14 +220,16 @@ public abstract class Mob extends LivingEntity implements Targeting {
Expand All @@ -2977,7 +2977,7 @@ index d28c477171c1b6888a45175075017d960464b5cd..4cb836dfa7cbd2e634d4a3a567da0305
this.targetSelector.tick();
}
}
@@ -913,16 +915,20 @@ public abstract class Mob extends LivingEntity implements Targeting {
@@ -911,16 +913,20 @@ public abstract class Mob extends LivingEntity implements Targeting {

if (i % 2 != 0 && this.tickCount > 1) {
this.level().getProfiler().push("targetSelector");
Expand Down Expand Up @@ -3302,7 +3302,7 @@ index b2bc3a832c310448046ccde37a04918aa6d63197..5e43912708f9074dee1bb351efa737a7
this.level().getProfiler().pop();
super.customServerAiStep();
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
index f555e29c7f9ea4ddb243a018bdc93d2bf1950c3c..bbcc0356b4c0470502e893cf2dc2f16936a88bc4 100644
index cbe2a37f74f4fb2abd0b3297699e54335aaed64f..2460768aaa7b8e6d183c03c1f0f2ccd6cb61a16f 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
@@ -142,6 +142,8 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
Expand Down Expand Up @@ -3701,7 +3701,7 @@ index a71414397bd45ee7bcacfeef0041d80dfa25f114..d66806565770cb03a21794f99e5c4b0f

@Override
diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
index 1d9b23c6e458caddc2c738164e6c079cd85d3ce9..1cfacc7dfa4a761c4a4fb28f9bb02e95bace32f4 100644
index d4dcf7fe26474ae07374e7761d823bc5c8b54f97..1d13fabb3f34023b4fbb1be9ad02ebc606645531 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
@@ -47,7 +47,10 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
Expand Down Expand Up @@ -3798,7 +3798,7 @@ index 1d9b23c6e458caddc2c738164e6c079cd85d3ce9..1cfacc7dfa4a761c4a4fb28f9bb02e95

public static void entityInside(Level world, BlockPos pos, BlockState state, Entity entity, HopperBlockEntity blockEntity) {
diff --git a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
index 081691f9710ff1115e4308f79ed49fbc38941193..765ee7f78532a363813286ef7db2a7e48605cb06 100644
index 3e638f12956e57548f76c7e2403ba370f7baa249..02364a148b347e3669275553004391e31d77c0b5 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
@@ -96,12 +96,7 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc
Expand Down Expand Up @@ -4089,10 +4089,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 5f33d18234c055393255c9c3234c6688af7a455d..f4de049f5bdd1e30050e680bfb3681a640cccc59 100644
index 9c08303de2891de92e06de8a939a618b7a6f7321..84fc6392dae77084718dc15fc58213c723d65a70 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1122,6 +1122,11 @@ public final class CraftServer implements Server {
@@ -1124,6 +1124,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 Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ index e38e2e5a7ddba9c140f362021b6be0b0974f7cd1..daa2d27758024cdb6025e0df9d103504
} else {
this.startProgress(advancementholder, advancementprogress);
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 462c4eb3c06779f86f66778e9578d3d8f06c3294..a87d025a7ad0b7df16bea6fa4aeecae416551dde 100644
index e5c955e7e99bc07199feabfe9f0301016ad38b84..40527db18b7177d887b65825ac51613097803be8 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -218,6 +218,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
Expand Down Expand Up @@ -236,10 +236,10 @@ index e5006e7672ba79ed4bcf2c4173c5a9ed4c68395b..6338c52e0082d36d3b80038fdb44abf2
// Paper end
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 30dd56871acff2dd730d96406520bab066229d7a..521a50718f63c5ccc3e39b70bee7e43809d19f7e 100644
index 33abcf12b4426572b74ca4c813e4392c823494bc..20c9b6baee6e08ffcf4757ebe46f6dd7874b466e 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1142,6 +1142,7 @@ public abstract class PlayerList {
@@ -1163,6 +1163,7 @@ public abstract class PlayerList {
} else {
b0 = (byte) (24 + permissionLevel);
}
Expand Down Expand Up @@ -330,34 +330,34 @@ index 38cde466714e5663cd416b6afd5d2558e139ec09..931c23801be88d0437c757970c27fd47
public CompoundTag getUpdateTag() {
return this.saveWithoutMetadata();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index f4de049f5bdd1e30050e680bfb3681a640cccc59..b72fd7c3da4deded2b27166027cdfdce3c06e486 100644
index 84fc6392dae77084718dc15fc58213c723d65a70..add35f2839e8307ca30c3dbedaf2679f9b8918ee 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1039,6 +1039,7 @@ public final class CraftServer implements Server {
@@ -1041,6 +1041,7 @@ public final class CraftServer implements Server {

org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
this.console.paperConfigurations.reloadConfigs(this.console);
+ org.purpurmc.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur
for (ServerLevel world : this.console.getAllLevels()) {
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters, config.spawnAnimals); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean))
@@ -1054,6 +1055,7 @@ public final class CraftServer implements Server {
@@ -1056,6 +1057,7 @@ public final class CraftServer implements Server {
}
}
world.spigotConfig.init(); // Spigot
+ world.purpurConfig.init(); // Purpur
}

Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
@@ -1069,6 +1071,7 @@ public final class CraftServer implements Server {
@@ -1071,6 +1073,7 @@ public final class CraftServer implements Server {
this.reloadData();
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper
+ org.purpurmc.purpur.PurpurConfig.registerCommands(); // Purpur
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");

@@ -2920,6 +2923,18 @@ public final class CraftServer implements Server {
@@ -2983,6 +2986,18 @@ public final class CraftServer implements Server {
return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
}

Expand All @@ -376,7 +376,7 @@ index f4de049f5bdd1e30050e680bfb3681a640cccc59..b72fd7c3da4deded2b27166027cdfdce
@Override
public void restart() {
org.spigotmc.RestartCommand.restart();
@@ -3138,4 +3153,11 @@ public final class CraftServer implements Server {
@@ -3201,4 +3216,11 @@ public final class CraftServer implements Server {
}

// Paper end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@ index b2f08889139dc447f7071f1c81456035bf8de31e..4317aee5a31627e48e1f759e653b9db4
+ // EMC end
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
index 765ee7f78532a363813286ef7db2a7e48605cb06..2a1c5b83e97028a7ac44b34c88bef838d33977ca 100644
index 02364a148b347e3669275553004391e31d77c0b5..c3b423fe8a12c1e9d4eccd24296a8cfa0b86f8dd 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
@@ -70,6 +70,7 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc
}

public void unpackLootTable(@Nullable Player player) {
+ if (player == null) return; // EMC
if (this.lootableData.shouldReplenish(player) && this.level.getServer() != null) { // Paper
if (this.level != null && this.lootableData.shouldReplenish(player) && this.level.getServer() != null) { // Paper - don't unpack loot table if not in world
LootTable lootTable = this.level.getServer().getLootData().getLootTable(this.lootTable);
if (player instanceof ServerPlayer) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 5e350fa39f47d54f6048ea89c1317759f122b8ae..2897cb8a23dd481e54e43fe9ddc30b30cecf4bad 100644
index c3060d1d4d0caf369c6ab516cb424f45eb851019..6bf3a0ea87af0be84c3b1e0bd2ccdd52a7caf5d4 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -407,7 +407,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
Expand Down
Loading

0 comments on commit 809a1d2

Please sign in to comment.