diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/gametest/framework/TestCommand.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/gametest/framework/TestCommand.java.patch new file mode 100644 index 000000000..8002c2998 --- /dev/null +++ b/purpur-server/minecraft-patches/sources/net/minecraft/gametest/framework/TestCommand.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/gametest/framework/TestCommand.java ++++ b/net/minecraft/gametest/framework/TestCommand.java +@@ -449,7 +_,7 @@ + ) + ) + ); +- if (SharedConstants.IS_RUNNING_IN_IDE) { ++ if (org.purpurmc.purpur.PurpurConfig.registerMinecraftDebugCommands || SharedConstants.IS_RUNNING_IN_IDE) { // Purpur - register minecraft debug commands + literalArgumentBuilder = literalArgumentBuilder.then( + Commands.literal("export") + .then( diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/AbstractContainerMenu.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/AbstractContainerMenu.java.patch index bca7321cd..f1681845d 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/AbstractContainerMenu.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/AbstractContainerMenu.java.patch @@ -8,3 +8,12 @@ // CraftBukkit start public boolean checkReachable = true; public abstract org.bukkit.inventory.InventoryView getBukkitView(); +@@ -552,7 +_,7 @@ + + slot.setChanged(); + // CraftBukkit start - Make sure the client has the right slot contents +- if (player instanceof ServerPlayer serverPlayer && slot.getMaxStackSize() != 64) { ++ if (player instanceof ServerPlayer serverPlayer && slot.getMaxStackSize() != net.minecraft.world.Container.MAX_STACK) { // Purpur - PaperPR#12654 + serverPlayer.connection.send(new net.minecraft.network.protocol.game.ClientboundContainerSetSlotPacket(this.containerId, this.incrementStateId(), slot.index, slot.getItem())); + // Updating a crafting inventory makes the client reset the result slot, have to send it again + if (this.getBukkitView().getType() == org.bukkit.event.inventory.InventoryType.WORKBENCH || this.getBukkitView().getType() == org.bukkit.event.inventory.InventoryType.CRAFTING) { diff --git a/purpur-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java.patch b/purpur-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java.patch index 266f13c33..d7511caa8 100644 --- a/purpur-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java.patch +++ b/purpur-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java.patch @@ -1,10 +1,9 @@ --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java -@@ -380,4 +_,12 @@ +@@ -380,4 +_,11 @@ public void clearReputations() { getHandle().getGossips().gossips.clear(); } -+ // Paper end + + // Purpur start - Lobotomize stuck villagers + @Override diff --git a/purpur-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java.patch b/purpur-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java.patch index 4d83946e7..23e754ef4 100644 --- a/purpur-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java.patch +++ b/purpur-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java.patch @@ -1,9 +1,9 @@ --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java -@@ -228,4 +_,15 @@ - return this.getKey().hashCode(); - } +@@ -91,6 +_,18 @@ + this.getHandle().setSoundVariant(CraftSoundVariant.bukkitToMinecraftHolder(soundVariant)); } + + // Purpur start - Configurable chance for wolves to spawn rabid + @Override + public boolean isRabid() { @@ -15,4 +15,7 @@ + getHandle().setRabid(isRabid); + } + // Purpur end - Configurable chance for wolves to spawn rabid - } ++ + public static class CraftVariant implements Variant, Handleable { + + public static Variant minecraftToBukkit(WolfVariant minecraft) { diff --git a/purpur-server/src/main/java/org/purpurmc/purpur/entity/PurpurStoredBee.java b/purpur-server/src/main/java/org/purpurmc/purpur/entity/PurpurStoredBee.java index cdaa50276..683a98b42 100644 --- a/purpur-server/src/main/java/org/purpurmc/purpur/entity/PurpurStoredBee.java +++ b/purpur-server/src/main/java/org/purpurmc/purpur/entity/PurpurStoredBee.java @@ -3,6 +3,7 @@ package org.purpurmc.purpur.entity; import com.mojang.logging.LogUtils; import io.papermc.paper.adventure.PaperAdventure; import net.kyori.adventure.text.Component; +import net.minecraft.core.RegistryAccess; import net.minecraft.nbt.CompoundTag; import net.minecraft.util.ProblemReporter; import net.minecraft.world.level.block.entity.BeehiveBlockEntity; @@ -39,7 +40,7 @@ public class PurpurStoredBee implements StoredEntity { CompoundTag customData = handle.occupant.entityData().copyTag(); try (ProblemReporter.ScopedCollector scopedCollector = new ProblemReporter.ScopedCollector(blockEntity.problemPath(), LOGGER)) { - ValueInput valueInput = TagValueInput.create(scopedCollector, blockEntity.getLevel().registryAccess(), customData); + ValueInput valueInput = TagValueInput.create(scopedCollector, RegistryAccess.EMPTY, customData); net.minecraft.network.chat.Component customNameMinecraft = BlockEntity.parseCustomNameSafe(valueInput, "CustomName"); this.customName = customNameMinecraft == null ? null : PaperAdventure.asAdventure(customNameMinecraft);