Skip to content

Commit 69742b8

Browse files
committed
Merge branch 'ver/1.21.5' into ver/1.21.6
2 parents 25d39e9 + 849bc79 commit 69742b8

5 files changed

Lines changed: 30 additions & 7 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- a/net/minecraft/gametest/framework/TestCommand.java
2+
+++ b/net/minecraft/gametest/framework/TestCommand.java
3+
@@ -449,7 +_,7 @@
4+
)
5+
)
6+
);
7+
- if (SharedConstants.IS_RUNNING_IN_IDE) {
8+
+ if (org.purpurmc.purpur.PurpurConfig.registerMinecraftDebugCommands || SharedConstants.IS_RUNNING_IN_IDE) { // Purpur - register minecraft debug commands
9+
literalArgumentBuilder = literalArgumentBuilder.then(
10+
Commands.literal("export")
11+
.then(

purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/AbstractContainerMenu.java.patch

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,12 @@
88
// CraftBukkit start
99
public boolean checkReachable = true;
1010
public abstract org.bukkit.inventory.InventoryView getBukkitView();
11+
@@ -552,7 +_,7 @@
12+
13+
slot.setChanged();
14+
// CraftBukkit start - Make sure the client has the right slot contents
15+
- if (player instanceof ServerPlayer serverPlayer && slot.getMaxStackSize() != 64) {
16+
+ if (player instanceof ServerPlayer serverPlayer && slot.getMaxStackSize() != net.minecraft.world.Container.MAX_STACK) { // Purpur - PaperPR#12654
17+
serverPlayer.connection.send(new net.minecraft.network.protocol.game.ClientboundContainerSetSlotPacket(this.containerId, this.incrementStateId(), slot.index, slot.getItem()));
18+
// Updating a crafting inventory makes the client reset the result slot, have to send it again
19+
if (this.getBukkitView().getType() == org.bukkit.event.inventory.InventoryType.WORKBENCH || this.getBukkitView().getType() == org.bukkit.event.inventory.InventoryType.CRAFTING) {

purpur-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java.patch

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
22
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
3-
@@ -380,4 +_,12 @@
3+
@@ -380,4 +_,11 @@
44
public void clearReputations() {
55
getHandle().getGossips().gossips.clear();
66
}
7-
+ // Paper end
87
+
98
+ // Purpur start - Lobotomize stuck villagers
109
+ @Override
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java
22
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java
3-
@@ -228,4 +_,15 @@
4-
return this.getKey().hashCode();
5-
}
3+
@@ -91,6 +_,18 @@
4+
this.getHandle().setSoundVariant(CraftSoundVariant.bukkitToMinecraftHolder(soundVariant));
65
}
6+
77
+ // Purpur start - Configurable chance for wolves to spawn rabid
88
+ @Override
99
+ public boolean isRabid() {
@@ -15,4 +15,7 @@
1515
+ getHandle().setRabid(isRabid);
1616
+ }
1717
+ // Purpur end - Configurable chance for wolves to spawn rabid
18-
}
18+
+
19+
public static class CraftVariant implements Variant, Handleable<WolfVariant> {
20+
21+
public static Variant minecraftToBukkit(WolfVariant minecraft) {

purpur-server/src/main/java/org/purpurmc/purpur/entity/PurpurStoredBee.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.mojang.logging.LogUtils;
44
import io.papermc.paper.adventure.PaperAdventure;
55
import net.kyori.adventure.text.Component;
6+
import net.minecraft.core.RegistryAccess;
67
import net.minecraft.nbt.CompoundTag;
78
import net.minecraft.util.ProblemReporter;
89
import net.minecraft.world.level.block.entity.BeehiveBlockEntity;
@@ -39,7 +40,7 @@ public PurpurStoredBee(BeehiveBlockEntity.BeeData data, EntityBlockStorage<Bee>
3940
CompoundTag customData = handle.occupant.entityData().copyTag();
4041

4142
try (ProblemReporter.ScopedCollector scopedCollector = new ProblemReporter.ScopedCollector(blockEntity.problemPath(), LOGGER)) {
42-
ValueInput valueInput = TagValueInput.create(scopedCollector, blockEntity.getLevel().registryAccess(), customData);
43+
ValueInput valueInput = TagValueInput.create(scopedCollector, RegistryAccess.EMPTY, customData);
4344

4445
net.minecraft.network.chat.Component customNameMinecraft = BlockEntity.parseCustomNameSafe(valueInput, "CustomName");
4546
this.customName = customNameMinecraft == null ? null : PaperAdventure.asAdventure(customNameMinecraft);

0 commit comments

Comments
 (0)