More mobs
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
--- a/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
||||
+++ b/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
||||
@@ -226,7 +_,7 @@
|
||||
|
||||
@Override
|
||||
public int getMaxAirSupply() {
|
||||
- return 6000;
|
||||
+ return this.maxAirTicks; // CraftBukkit - SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -426,10 +_,10 @@
|
||||
if (effect == null || effect.endsWithin(2399)) {
|
||||
int i = effect != null ? effect.getDuration() : 0;
|
||||
int min = Math.min(2400, 100 + i);
|
||||
- player.addEffect(new MobEffectInstance(MobEffects.REGENERATION, min, 0), this);
|
||||
+ player.addEffect(new MobEffectInstance(MobEffects.REGENERATION, min, 0), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.AXOLOTL); // CraftBukkit
|
||||
}
|
||||
|
||||
- player.removeEffect(MobEffects.DIG_SLOWDOWN);
|
||||
+ player.removeEffect(MobEffects.DIG_SLOWDOWN, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.AXOLOTL); // Paper - Add missing effect cause
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -620,4 +_,11 @@
|
||||
return Util.getRandom(variants, random);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ // CraftBukkit start - SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
|
||||
+ @Override
|
||||
+ public int getDefaultMaxAirSupply() {
|
||||
+ return Axolotl.AXOLOTL_TOTAL_AIR_SUPPLY;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
Reference in New Issue
Block a user