mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2024-11-25 05:46:13 +00:00
23 lines
930 B
Diff
23 lines
930 B
Diff
--- 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
|
|
}
|
|
|
|
}
|