aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-vineflower/net/minecraft/world/effect/PoisonMobEffect.java.patch
blob: ad997537d9f364db74000dabef1bbfef4dd22321 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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;
     }
 }