mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
Missing effect cause
This commit is contained in:
parent
bde548833e
commit
b24b187864
2 changed files with 15 additions and 2 deletions
|
@ -124,6 +124,15 @@
|
|||
this.setFlag(2, nearTarget);
|
||||
}
|
||||
|
||||
@@ -602,7 +636,7 @@
|
||||
if (mobeffect != null) {
|
||||
this.usePlayerItem(player, hand, itemstack);
|
||||
if (!this.level().isClientSide) {
|
||||
- this.addEffect(mobeffect);
|
||||
+ this.addEffect(mobeffect, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.FOOD); // Paper - Add missing effect cause
|
||||
}
|
||||
|
||||
return InteractionResult.SUCCESS;
|
||||
@@ -671,8 +705,14 @@
|
||||
if (this.isInvulnerableTo(world, source)) {
|
||||
return false;
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
}
|
||||
|
||||
@Override
|
||||
@@ -414,7 +421,7 @@
|
||||
@@ -414,10 +421,10 @@
|
||||
int i = mobeffect != null ? mobeffect.getDuration() : 0;
|
||||
int j = Math.min(2400, 100 + i);
|
||||
|
||||
|
@ -36,7 +36,11 @@
|
|||
+ player.addEffect(new MobEffectInstance(MobEffects.REGENERATION, j, 0), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.AXOLOTL); // CraftBukkit
|
||||
}
|
||||
|
||||
player.removeEffect(MobEffects.DIG_SLOWDOWN);
|
||||
- player.removeEffect(MobEffects.DIG_SLOWDOWN);
|
||||
+ player.removeEffect(MobEffects.DIG_SLOWDOWN, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.AXOLOTL); // Paper - Add missing effect cause
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -464,7 +471,7 @@
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue