Update patches to latest 1.21.4 #1

Merged
Chaoscaot merged 242 commits from update/1.21.4 into main 2025-04-23 22:27:11 +02:00
Showing only changes of commit c0bd5688b5 - Show all commits

View File

@@ -41,6 +41,7 @@ import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.NamespacedKey; import org.bukkit.NamespacedKey;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.craftbukkit.CraftEquipmentSlot;
import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.event.CraftEventFactory; import org.bukkit.craftbukkit.event.CraftEventFactory;
import org.bukkit.craftbukkit.inventory.CraftContainer; import org.bukkit.craftbukkit.inventory.CraftContainer;
@@ -922,6 +923,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
return success ? (Firework) fireworks.getBukkitEntity() : null; return success ? (Firework) fireworks.getBukkitEntity() : null;
} }
@Override
public boolean canUseEquipmentSlot(org.bukkit.inventory.EquipmentSlot slot) {
net.minecraft.world.entity.EquipmentSlot equipmentSlot = CraftEquipmentSlot.getNMS(slot);
return (equipmentSlot.getType() == net.minecraft.world.entity.EquipmentSlot.Type.HUMANOID_ARMOR || equipmentSlot.getType() == net.minecraft.world.entity.EquipmentSlot.Type.HAND) && super.canUseEquipmentSlot(slot);
}
@Override @Override
public org.bukkit.entity.Entity copy() { public org.bukkit.entity.Entity copy() {
throw new UnsupportedOperationException("Cannot copy human entities"); throw new UnsupportedOperationException("Cannot copy human entities");