aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-vineflower/net/minecraft/world/effect/PoisonMobEffect.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-vineflower/net/minecraft/world/effect/PoisonMobEffect.java.patch')
-rw-r--r--patch-remap/mache-vineflower/net/minecraft/world/effect/PoisonMobEffect.java.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower/net/minecraft/world/effect/PoisonMobEffect.java.patch b/patch-remap/mache-vineflower/net/minecraft/world/effect/PoisonMobEffect.java.patch
new file mode 100644
index 0000000000..ad997537d9
--- /dev/null
+++ b/patch-remap/mache-vineflower/net/minecraft/world/effect/PoisonMobEffect.java.patch
@@ -0,0 +1,30 @@
+--- a/net/minecraft/world/effect/PoisonMobEffect.java
++++ b/net/minecraft/world/effect/PoisonMobEffect.java
+@@ -3,6 +3,7 @@
+ import net.minecraft.world.entity.LivingEntity;
+
+ class PoisonMobEffect extends MobEffect {
++
+ protected PoisonMobEffect(MobEffectCategory category, int color) {
+ super(category, color);
+ }
+@@ -11,13 +12,15 @@
+ public void applyEffectTick(LivingEntity livingEntity, int amplifier) {
+ super.applyEffectTick(livingEntity, amplifier);
+ if (livingEntity.getHealth() > 1.0F) {
+- livingEntity.hurt(livingEntity.damageSources().magic(), 1.0F);
++ livingEntity.hurt(livingEntity.damageSources().poison, 1.0F); // CraftBukkit - DamageSource.MAGIC -> CraftEventFactory.POISON
+ }
++
+ }
+
+ @Override
+- public boolean shouldApplyEffectTickThisTick(int i, int i1) {
+- int i2 = 25 >> i1;
+- return i2 <= 0 || i % i2 == 0;
++ public boolean shouldApplyEffectTickThisTick(int i, int j) {
++ int k = 25 >> j;
++
++ return k > 0 ? i % k == 0 : true;
+ }
+ }