aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-vineflower/net/minecraft/world/effect/RegenerationMobEffect.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-vineflower/net/minecraft/world/effect/RegenerationMobEffect.java.patch')
-rw-r--r--patch-remap/mache-vineflower/net/minecraft/world/effect/RegenerationMobEffect.java.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower/net/minecraft/world/effect/RegenerationMobEffect.java.patch b/patch-remap/mache-vineflower/net/minecraft/world/effect/RegenerationMobEffect.java.patch
new file mode 100644
index 0000000000..564cd4fa0f
--- /dev/null
+++ b/patch-remap/mache-vineflower/net/minecraft/world/effect/RegenerationMobEffect.java.patch
@@ -0,0 +1,30 @@
+--- a/net/minecraft/world/effect/RegenerationMobEffect.java
++++ b/net/minecraft/world/effect/RegenerationMobEffect.java
+@@ -3,6 +3,7 @@
+ import net.minecraft.world.entity.LivingEntity;
+
+ class RegenerationMobEffect extends MobEffect {
++
+ protected RegenerationMobEffect(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() < livingEntity.getMaxHealth()) {
+- livingEntity.heal(1.0F);
++ livingEntity.heal(1.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.MAGIC_REGEN); // CraftBukkit
+ }
++
+ }
+
+ @Override
+- public boolean shouldApplyEffectTickThisTick(int i, int i1) {
+- int i2 = 50 >> i1;
+- return i2 <= 0 || i % i2 == 0;
++ public boolean shouldApplyEffectTickThisTick(int i, int j) {
++ int k = 50 >> j;
++
++ return k > 0 ? i % k == 0 : true;
+ }
+ }