--- a/net/minecraft/world/entity/animal/axolotl/Axolotl.java +++ b/net/minecraft/world/entity/animal/axolotl/Axolotl.java @@ -68,7 +68,8 @@ public static final int TOTAL_PLAYDEAD_TIME = 200; protected static final ImmutableList>> SENSOR_TYPES = ImmutableList.of(SensorType.NEAREST_LIVING_ENTITIES, SensorType.NEAREST_ADULT, SensorType.HURT_BY, SensorType.AXOLOTL_ATTACKABLES, SensorType.AXOLOTL_TEMPTATIONS); - protected static final ImmutableList> MEMORY_TYPES = ImmutableList.of(MemoryModuleType.BREED_TARGET, MemoryModuleType.NEAREST_LIVING_ENTITIES, MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES, MemoryModuleType.NEAREST_VISIBLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_ATTACKABLE_PLAYER, MemoryModuleType.LOOK_TARGET, MemoryModuleType.WALK_TARGET, MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE, MemoryModuleType.PATH, MemoryModuleType.ATTACK_TARGET, MemoryModuleType.ATTACK_COOLING_DOWN, MemoryModuleType.NEAREST_VISIBLE_ADULT, new MemoryModuleType[]{MemoryModuleType.HURT_BY_ENTITY, MemoryModuleType.PLAY_DEAD_TICKS, MemoryModuleType.NEAREST_ATTACKABLE, MemoryModuleType.TEMPTING_PLAYER, MemoryModuleType.TEMPTATION_COOLDOWN_TICKS, MemoryModuleType.IS_TEMPTED, MemoryModuleType.HAS_HUNTING_COOLDOWN}); + // CraftBukkit - decompile error + protected static final ImmutableList> MEMORY_TYPES = ImmutableList.>of(MemoryModuleType.BREED_TARGET, MemoryModuleType.NEAREST_LIVING_ENTITIES, MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES, MemoryModuleType.NEAREST_VISIBLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_ATTACKABLE_PLAYER, MemoryModuleType.LOOK_TARGET, MemoryModuleType.WALK_TARGET, MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE, MemoryModuleType.PATH, MemoryModuleType.ATTACK_TARGET, MemoryModuleType.ATTACK_COOLING_DOWN, MemoryModuleType.NEAREST_VISIBLE_ADULT, new MemoryModuleType[]{MemoryModuleType.HURT_BY_ENTITY, MemoryModuleType.PLAY_DEAD_TICKS, MemoryModuleType.NEAREST_ATTACKABLE, MemoryModuleType.TEMPTING_PLAYER, MemoryModuleType.TEMPTATION_COOLDOWN_TICKS, MemoryModuleType.IS_TEMPTED, MemoryModuleType.HAS_HUNTING_COOLDOWN}); private static final DataWatcherObject DATA_VARIANT = DataWatcher.a(Axolotl.class, DataWatcherRegistry.INT); private static final DataWatcherObject DATA_PLAYING_DEAD = DataWatcher.a(Axolotl.class, DataWatcherRegistry.BOOLEAN); private static final DataWatcherObject FROM_BUCKET = DataWatcher.a(Axolotl.class, DataWatcherRegistry.BOOLEAN); @@ -239,6 +240,7 @@ @Override public void setFromBucket(boolean flag) { this.entityData.set(Axolotl.FROM_BUCKET, flag); + this.persistenceRequired = this.isPersistent(); // CraftBukkit - SPIGOT-4106 update persistence } @Nullable @@ -280,7 +282,7 @@ @Override protected void mobTick() { this.level.getMethodProfiler().enter("axolotlBrain"); - this.getBehaviorController().a((WorldServer) this.level, (EntityLiving) this); + this.getBehaviorController().a((WorldServer) this.level, this); // CraftBukkit - decompile error this.level.getMethodProfiler().exit(); this.level.getMethodProfiler().enter("axolotlActivityUpdate"); AxolotlAi.a(this); @@ -422,7 +424,7 @@ if (i < 2400) { i = Math.min(2400, 100 + i); - entityhuman.addEffect(new MobEffect(MobEffects.REGENERATION, i, 0), this); + entityhuman.addEffect(new MobEffect(MobEffects.REGENERATION, i, 0), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.AXOLOTL); // CraftBukkit } entityhuman.removeEffect(MobEffects.DIG_SLOWDOWN); @@ -472,7 +474,7 @@ @Override public BehaviorController getBehaviorController() { - return super.getBehaviorController(); + return (BehaviorController) super.getBehaviorController(); // CraftBukkit - decompile error } @Override @@ -505,7 +507,7 @@ @Override public boolean isTypeNotPersistent(double d0) { - return !this.isFromBucket() && !this.hasCustomName(); + return true; // CraftBukkit } private static class c extends SmoothSwimmingMoveControl {