Skip to content

Commit

Permalink
Updated Upstream (Paper/Gale)
Browse files Browse the repository at this point in the history
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@e01ddf4 Fixup porting issue in vanillaBiomeProvider impl (#11185)
PaperMC/Paper@509ea2f Fix horse armor desync (#11341)
PaperMC/Paper@2f0891e Fix InventoryOpenEvent cancellation (#11304)
PaperMC/Paper@227c94a Fix inventory desync when placing blocks with spawn protection (#11090)

Gale Changes:
Dreeam-qwq/Gale@afab253 Updated Upstream (Paper)
  • Loading branch information
Dreeam-qwq committed Sep 1, 2024
1 parent 910864f commit 68b8661
Show file tree
Hide file tree
Showing 7 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 = cn.dreeam.leaf
mcVersion = 1.21.1
version = 1.21.1-R0.1-SNAPSHOT

galeCommit = afbc1eac25a22cb0b7b43b86b75c688718af364c
galeCommit = afab253c5b7b291345f864d2f952cb89c304d7da

org.gradle.caching = true
org.gradle.parallel = true
Expand Down
48 changes: 24 additions & 24 deletions patches/server/0011-Purpur-Server-Changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ index c80be65d190c85e7f0ea8233ebbbdbc1ea67f276..97e793c971614299504605aeb4f99cad
public ServerEntity(ServerLevel worldserver, Entity entity, int i, boolean flag, Consumer<Packet<?>> consumer, Set<ServerPlayerConnection> trackedPlayers) {
this.trackedPlayers = trackedPlayers;
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 881f507ff6fcac86f8ef04cbd3ff10c41c840d52..0ed4f5a291ef5009a0535273ac52a9fbac150553 100644
index 54962156d2e03255e970b47375549db2a256a09f..db427ee9dcc30639711ada54fd9323a8aa8e4002 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -220,6 +220,8 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
Expand Down Expand Up @@ -1155,7 +1155,7 @@ index 881f507ff6fcac86f8ef04cbd3ff10c41c840d52..0ed4f5a291ef5009a0535273ac52a9fb
}
// Paper end - Fix merchant inventory not closing on entity removal
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index eff9dfeb7a95107b87748152ca4e59348243a66b..e6d22346d37261751563b039ae2ad8629ff83d8e 100644
index 1b3d0bb2ea57572b1419373873f04cc4e62d3795..1dc2af59bafa5a5dc6721da02cde19a3ca77af28 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -303,6 +303,10 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
Expand Down Expand Up @@ -1276,7 +1276,7 @@ index eff9dfeb7a95107b87748152ca4e59348243a66b..e6d22346d37261751563b039ae2ad862
this.connection.send(new ClientboundBlockUpdatePacket(this.level(), sign.getBlockPos()));
this.connection.send(new ClientboundOpenSignEditorPacket(sign.getBlockPos(), front));
}
@@ -2000,6 +2044,26 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
@@ -2004,6 +2048,26 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
this.lastSentExp = -1; // CraftBukkit - Added to reset
}

Expand All @@ -1303,7 +1303,7 @@ index eff9dfeb7a95107b87748152ca4e59348243a66b..e6d22346d37261751563b039ae2ad862
@Override
public void displayClientMessage(Component message, boolean overlay) {
this.sendSystemMessage(message, overlay);
@@ -2340,8 +2404,68 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
@@ -2344,8 +2408,68 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple

public void resetLastActionTime() {
this.lastActionTime = Util.getMillis();
Expand Down Expand Up @@ -1372,7 +1372,7 @@ index eff9dfeb7a95107b87748152ca4e59348243a66b..e6d22346d37261751563b039ae2ad862
public ServerStatsCounter getStats() {
return this.stats;
}
@@ -2945,4 +3069,50 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
@@ -2949,4 +3073,50 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
return (CraftPlayer) super.getBukkitEntity();
}
// CraftBukkit end
Expand Down Expand Up @@ -1424,7 +1424,7 @@ index eff9dfeb7a95107b87748152ca4e59348243a66b..e6d22346d37261751563b039ae2ad862
+ // Purpur end
}
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index cc01ead133cc6859ca5d7a1d0ac3c12955e590da..7c06b284a6cc74c0b31f8921706c7796dcc4e402 100644
index ee9e4521079137d7b72194e8789810e7a89b8e75..28731f0c5b0ba63fa8d5ce3ee580bf314a844f92 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -405,6 +405,7 @@ public class ServerPlayerGameMode {
Expand All @@ -1443,7 +1443,7 @@ index cc01ead133cc6859ca5d7a1d0ac3c12955e590da..7c06b284a6cc74c0b31f8921706c7796
BlockPos blockposition = hitResult.getBlockPos();
BlockState iblockdata = world.getBlockState(blockposition);
boolean cancelledBlock = false;
@@ -578,7 +580,7 @@ public class ServerPlayerGameMode {
@@ -577,7 +579,7 @@ public class ServerPlayerGameMode {
ItemStack itemstack1 = stack.copy();
InteractionResult enuminteractionresult;

Expand All @@ -1452,7 +1452,7 @@ index cc01ead133cc6859ca5d7a1d0ac3c12955e590da..7c06b284a6cc74c0b31f8921706c7796
ItemInteractionResult iteminteractionresult = iblockdata.useItemOn(player.getItemInHand(hand), world, player, hand, hitResult);

if (iteminteractionresult.consumesAction()) {
@@ -626,4 +628,18 @@ public class ServerPlayerGameMode {
@@ -625,4 +627,18 @@ public class ServerPlayerGameMode {
public void setLevel(ServerLevel world) {
this.level = world;
}
Expand Down Expand Up @@ -1498,7 +1498,7 @@ index a720a05c47b2137a07515461960603cc5c939d16..b66fdb789fcb460d63fd81540112d655
try {
String channels = payload.toString(com.google.common.base.Charsets.UTF_8);
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index ec3f2907cd850c163d2e703fcbb8c025c0eaeedb..2564993b75a6602d6bbe9d2d4acaccac0ef3d241 100644
index 1816eea82d60e4433541a90c83825529301c6818..bde6f388ab0076114b8d81cc344fc88b40161d38 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -337,6 +337,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
Expand Down Expand Up @@ -14472,7 +14472,7 @@ index 2c992661d4864cf826464f840c9d13c09b26f86f..1da91797ddbaf2cee7124b3dbd0970ac
if (entityhuman != null) {
double d2 = entityhuman.distanceToSqr(d0, (double) i, d1);
diff --git a/src/main/java/net/minecraft/world/level/block/AnvilBlock.java b/src/main/java/net/minecraft/world/level/block/AnvilBlock.java
index 923357251ad950ec4f893e8771fcfa99de8a60c5..78a341ac80806f86f2ca0bd895fb091a9257519e 100644
index c77d4adbba79ec39ab78c2a6bac1e8f94ba7fd68..97f75aa767c90a244a094367b408e6899224c7b9 100644
--- a/src/main/java/net/minecraft/world/level/block/AnvilBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/AnvilBlock.java
@@ -59,6 +59,53 @@ public class AnvilBlock extends FallingBlock {
Expand Down Expand Up @@ -14923,10 +14923,10 @@ index daae7fd6e0148cfba8e359d990748a0c83a3376e..0e06b1bcd906e92c083dc74d56d6d0a2
return random.nextFloat() < f1 ? this.getNext(state) : Optional.empty();
}
diff --git a/src/main/java/net/minecraft/world/level/block/ChestBlock.java b/src/main/java/net/minecraft/world/level/block/ChestBlock.java
index 8fbfd18b3caeed769396b3ffb1b1778b2f38edc0..dbfe8f5d4df244cb694b73ea8763628c5f2507a3 100644
index 0b27baf10770cb3077c4e75da55209689d614513..485ea9892f257c6843db23bca43f9fdcd8fa1503 100644
--- a/src/main/java/net/minecraft/world/level/block/ChestBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/ChestBlock.java
@@ -343,6 +343,7 @@ public class ChestBlock extends AbstractChestBlock<ChestBlockEntity> implements
@@ -342,6 +342,7 @@ public class ChestBlock extends AbstractChestBlock<ChestBlockEntity> implements
}

public static boolean isBlockedChestByBlock(BlockGetter world, BlockPos pos) {
Expand Down Expand Up @@ -15149,19 +15149,19 @@ index a35a426cc7778a51523f26057b5d61b8a3e23d5d..28d8c8a879badc97cd1168e1847e2faf
EntityPortalEnterEvent event = new EntityPortalEnterEvent(entity.getBukkitEntity(), new org.bukkit.Location(world.getWorld(), pos.getX(), pos.getY(), pos.getZ()), org.bukkit.PortalType.ENDER); // Paper - add portal type
world.getCraftServer().getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/world/level/block/EnderChestBlock.java b/src/main/java/net/minecraft/world/level/block/EnderChestBlock.java
index ca92d49ef2010ba00c623491671dcde8ebe697c1..bd65df4588584b8bb001e9dc3656a14e381a0b6d 100644
index 491a59336899179c79820cd61541d49f7337c0f6..492fda30f22c8d09271931229ec02bb6f98f5889 100644
--- a/src/main/java/net/minecraft/world/level/block/EnderChestBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/EnderChestBlock.java
@@ -91,7 +91,7 @@ public class EnderChestBlock extends AbstractChestBlock<EnderChestBlockEntity> i
EnderChestBlockEntity enderChestBlockEntity = (EnderChestBlockEntity)blockEntity;
@@ -92,7 +92,7 @@ public class EnderChestBlock extends AbstractChestBlock<EnderChestBlockEntity> i
playerEnderChestContainer.setActiveChest(enderChestBlockEntity);
player.openMenu(
// Paper start - Fix InventoryOpenEvent cancellation
if (player.openMenu(
- new SimpleMenuProvider((i, inventory, playerx) -> ChestMenu.threeRows(i, inventory, playerEnderChestContainer), CONTAINER_TITLE)
+ new SimpleMenuProvider((i, inventory, playerx) -> org.purpurmc.purpur.PurpurConfig.enderChestSixRows ? getEnderChestSixRows(i, inventory, player, playerEnderChestContainer) : ChestMenu.threeRows(i, inventory, playerEnderChestContainer), CONTAINER_TITLE) // Purpur
);
player.awardStat(Stats.OPEN_ENDERCHEST);
PiglinAi.angerNearbyPiglins(player, true);
@@ -102,6 +102,35 @@ public class EnderChestBlock extends AbstractChestBlock<EnderChestBlockEntity> i
).isPresent()) {
player.awardStat(Stats.OPEN_ENDERCHEST);
PiglinAi.angerNearbyPiglins(player, true);
@@ -105,6 +105,35 @@ public class EnderChestBlock extends AbstractChestBlock<EnderChestBlockEntity> i
}
}

Expand Down Expand Up @@ -15740,10 +15740,10 @@ index 902825ec9ea05f4418b45f56a008d73f217bd178..6fe44572e34ad3e3a1851e73138bd8b7
if (!iblockdata.is(Blocks.KELP) && !iblockdata.is(Blocks.KELP_PLANT) && !iblockdata.is(Blocks.SEAGRASS) && !iblockdata.is(Blocks.TALL_SEAGRASS)) {
return false;
diff --git a/src/main/java/net/minecraft/world/level/block/StonecutterBlock.java b/src/main/java/net/minecraft/world/level/block/StonecutterBlock.java
index c6ecb378d0cb2ac05b8f22f92fb85df060038f77..b0199a8ffb1ea4cafeadedb8b833063db177b3cd 100644
index 59fd521cd1e1101e2adce9830c43784e05abccdd..ff04b4ed1f4e2e6ca2286243d4faaa9b8edcc7cc 100644
--- a/src/main/java/net/minecraft/world/level/block/StonecutterBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/StonecutterBlock.java
@@ -98,4 +98,14 @@ public class StonecutterBlock extends Block {
@@ -97,4 +97,14 @@ public class StonecutterBlock extends Block {
protected boolean isPathfindable(BlockState state, PathComputationType type) {
return false;
}
Expand Down Expand Up @@ -16994,10 +16994,10 @@ index ee08ee23bea25a2dd19518f84ec38fbbcda10f41..5d7280ad82c03b35ea6636d633ef411c
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 9738a27e9f7168a4a67d195f209f343d4ad5afc6..5f17622dece4038f13523bcd4a643e76ca9a9320 100644
index f4a2086f54f183e72d9f1923b6313016a9e08d0a..12a5c16f715b5f4d7509aaf8e26491a31c2cc4ff 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2333,6 +2333,48 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -2343,6 +2343,48 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return (this.getHandle().getDragonFight() == null) ? null : new CraftDragonBattle(this.getHandle().getDragonFight());
}

Expand Down
6 changes: 3 additions & 3 deletions patches/server/0040-Petal-Async-Pathfinding.patch
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This patch was ported downstream from the Petal fork.
Makes most pathfinding-related work happen asynchronously

diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index f43774ddcc6071ee2f61c57ac1a4596936194218..2002aef0b01de0b6f10478a9dd08778243bceb3d 100644
index 63b827d91a935d6b6f04266eea682da97af79cf2..02d7180e5b932dd8c7e8867f1334cbc47e26f5bd 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -297,6 +297,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
Expand Down Expand Up @@ -628,10 +628,10 @@ index f929b9e623eaea0e949a7af1828b9eb198fc66b8..1e31f20da2450e92228d511f060ff9f5
@Override
protected float distance(Node a, Node b) {
diff --git a/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java b/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java
index d85da0661096a3587917c6636728bfd2e3eb90a2..092c518b86184bc33c6616ab6dffec3f5f88ce97 100644
index c6a03d08fb90a3d5be6281cb6afd57b168e0c5c8..4f8197d1fcf48016b7482c648d53c37ed0047ca3 100644
--- a/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java
@@ -214,8 +214,15 @@ public class ShulkerBoxBlock extends BaseEntityBlock {
@@ -213,8 +213,15 @@ public class ShulkerBoxBlock extends BaseEntityBlock {

@Override
protected VoxelShape getShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ index 1e31f20da2450e92228d511f060ff9f5a3207005..de11e6b0d997b3bb2403441ab430a894
super.customServerAiStep();
if ((this.tickCount + this.getId()) % 120 == 0) {
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
index 4cdf3b54187ebcb1f5ddfa6114386127a2846f01..75c1d986216bbd0f02b5ff96a4d856ecd485a113 100644
index c14019a131c90c699b8a76bada82592b66f0fa89..bc0f0fd4b356a2f5b212c7d4a2007e12733439d6 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
@@ -45,7 +45,7 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain
Expand All @@ -201,7 +201,7 @@ index 4cdf3b54187ebcb1f5ddfa6114386127a2846f01..75c1d986216bbd0f02b5ff96a4d856ec
}

public ChestBoat(Level world, double d0, double d1, double d2) {
@@ -178,7 +178,7 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain
@@ -177,7 +177,7 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain

@Override
public int getContainerSize() {
Expand Down
8 changes: 4 additions & 4 deletions patches/server/0065-Improve-Purpur-AFK-system.patch
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ index b6713361cd104786f52bd880418b8653e4126fda..94bb40c9932b0b7dd9fb8af680b63d13
org.purpurmc.purpur.command.DemoCommand.register(this.dispatcher); // Purpur
org.purpurmc.purpur.command.PingCommand.register(this.dispatcher); // Purpur
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index d05f687cc2a765058c8eabfcb50d1cc84a13073d..8cc6423928b191049a85c023af740a92950d2c00 100644
index b2ae3fdf128e7d66e3f3430266321a6a09fa0be6..afc8145c48597be28e0c1d787b5dacb6761e66df 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -2410,6 +2410,8 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
@@ -2414,6 +2414,8 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple

// Purpur Start
private boolean isAfk = false;
Expand All @@ -31,7 +31,7 @@ index d05f687cc2a765058c8eabfcb50d1cc84a13073d..8cc6423928b191049a85c023af740a92

@Override
public void setAfk(boolean afk) {
@@ -2447,6 +2449,20 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
@@ -2451,6 +2453,20 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
String prefix = (split.length > 0 ? split[0] : "").replace(org.purpurmc.purpur.PurpurConfig.afkTabListPrefix, "");
String suffix = (split.length > 1 ? split[1] : "").replace(org.purpurmc.purpur.PurpurConfig.afkTabListSuffix, "");
if (afk) {
Expand All @@ -53,7 +53,7 @@ index d05f687cc2a765058c8eabfcb50d1cc84a13073d..8cc6423928b191049a85c023af740a92
} else {
getBukkitEntity().setPlayerListName(prefix + scoreboardName + suffix, true);
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 0dc07ae0ba843b14fe970b6b0883f315193917fd..3f123bbed6522c30d0319c465fce6830d7c274d1 100644
index 33b2234970e3b78ccd4b8da184bbdd62b50d3afa..81b0f8c986131335533f6c81f9150b8c6019f8d7 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2276,8 +2276,28 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0088-Fix-MC-119417.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Subject: [PATCH] Fix-MC-119417
Related MC issue: https://bugs.mojang.com/browse/MC-119417

diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 8cc6423928b191049a85c023af740a92950d2c00..0bab919a9a47ce831818d97722874c2f67126c87 100644
index afc8145c48597be28e0c1d787b5dacb6761e66df..8f188b137247289770b0a663124f6345a902cd8a 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -2256,6 +2256,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
@@ -2260,6 +2260,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.CHANGE_GAME_MODE, (float) gameMode.getId()));
if (gameMode == GameType.SPECTATOR) {
this.removeEntitiesOnShoulder();
Expand Down
Loading

0 comments on commit 68b8661

Please sign in to comment.