mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 01:17:42 +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
|
// CraftBukkit start
|
||||||
public boolean checkReachable = true;
|
public boolean checkReachable = true;
|
||||||
public abstract org.bukkit.inventory.InventoryView getBukkitView();
|
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
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
||||||
+++ b/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() {
|
public void clearReputations() {
|
||||||
getHandle().getGossips().gossips.clear();
|
getHandle().getGossips().gossips.clear();
|
||||||
}
|
}
|
||||||
+ // Paper end
|
|
||||||
+
|
+
|
||||||
+ // Purpur start - Lobotomize stuck villagers
|
+ // Purpur start - Lobotomize stuck villagers
|
||||||
+ @Override
|
+ @Override
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java
|
||||||
@@ -228,4 +_,15 @@
|
@@ -91,6 +_,18 @@
|
||||||
return this.getKey().hashCode();
|
this.getHandle().setSoundVariant(CraftSoundVariant.bukkitToMinecraftHolder(soundVariant));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Purpur start - Configurable chance for wolves to spawn rabid
|
+ // Purpur start - Configurable chance for wolves to spawn rabid
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public boolean isRabid() {
|
+ public boolean isRabid() {
|
||||||
@@ -15,4 +15,7 @@
|
|||||||
+ getHandle().setRabid(isRabid);
|
+ getHandle().setRabid(isRabid);
|
||||||
+ }
|
+ }
|
||||||
+ // Purpur end - Configurable chance for wolves to spawn rabid
|
+ // 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 com.mojang.logging.LogUtils;
|
||||||
import io.papermc.paper.adventure.PaperAdventure;
|
import io.papermc.paper.adventure.PaperAdventure;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
|
import net.minecraft.core.RegistryAccess;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.util.ProblemReporter;
|
import net.minecraft.util.ProblemReporter;
|
||||||
import net.minecraft.world.level.block.entity.BeehiveBlockEntity;
|
import net.minecraft.world.level.block.entity.BeehiveBlockEntity;
|
||||||
@@ -39,7 +40,7 @@ public class PurpurStoredBee implements StoredEntity<Bee> {
|
|||||||
CompoundTag customData = handle.occupant.entityData().copyTag();
|
CompoundTag customData = handle.occupant.entityData().copyTag();
|
||||||
|
|
||||||
try (ProblemReporter.ScopedCollector scopedCollector = new ProblemReporter.ScopedCollector(blockEntity.problemPath(), LOGGER)) {
|
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");
|
net.minecraft.network.chat.Component customNameMinecraft = BlockEntity.parseCustomNameSafe(valueInput, "CustomName");
|
||||||
this.customName = customNameMinecraft == null ? null : PaperAdventure.asAdventure(customNameMinecraft);
|
this.customName = customNameMinecraft == null ? null : PaperAdventure.asAdventure(customNameMinecraft);
|
||||||
|
|||||||
Reference in New Issue
Block a user