mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Merge branch 'ver/1.21.5' into ver/1.21.6
This commit is contained in:
@@ -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(
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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<WolfVariant> {
|
||||
|
||||
public static Variant minecraftToBukkit(WolfVariant minecraft) {
|
||||
|
||||
@@ -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<Bee> {
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user