Update to Minecraft 1.21.2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2024-10-23 02:15:00 +11:00
parent 2c4beb962b
commit d3a23f42c3
522 changed files with 8501 additions and 6477 deletions

View File

@@ -0,0 +1,22 @@
--- a/net/minecraft/world/item/component/DeathProtection.java
+++ b/net/minecraft/world/item/component/DeathProtection.java
@@ -15,6 +15,10 @@
import net.minecraft.world.item.consume_effects.ClearAllStatusEffectsConsumeEffect;
import net.minecraft.world.item.consume_effects.ConsumeEffect;
+// CraftBukkit start
+import org.bukkit.event.entity.EntityPotionEffectEvent;
+// CraftBukkit end
+
public record DeathProtection(List<ConsumeEffect> deathEffects) {
public static final Codec<DeathProtection> CODEC = RecordCodecBuilder.create((instance) -> {
@@ -29,7 +33,7 @@
while (iterator.hasNext()) {
ConsumeEffect consumeeffect = (ConsumeEffect) iterator.next();
- consumeeffect.apply(entityliving.level(), itemstack, entityliving);
+ consumeeffect.apply(entityliving.level(), itemstack, entityliving, EntityPotionEffectEvent.Cause.TOTEM); // CraftBukkit
}
}