diff --git a/nms-patches/net/minecraft/world/entity/monster/hoglin/EntityHoglin.patch b/nms-patches/net/minecraft/world/entity/monster/hoglin/EntityHoglin.patch new file mode 100644 index 000000000..84d7e913f --- /dev/null +++ b/nms-patches/net/minecraft/world/entity/monster/hoglin/EntityHoglin.patch @@ -0,0 +1,39 @@ +--- a/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java ++++ b/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java +@@ -63,7 +63,8 @@ + public int timeInOverworld; + public boolean cannotBeHunted; + protected static final ImmutableList>> SENSOR_TYPES = ImmutableList.of(SensorType.NEAREST_LIVING_ENTITIES, SensorType.NEAREST_PLAYERS, SensorType.NEAREST_ADULT, SensorType.HOGLIN_SPECIFIC_SENSOR); +- 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_PIGLIN, new MemoryModuleType[]{MemoryModuleType.AVOID_TARGET, MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, MemoryModuleType.NEAREST_VISIBLE_ADULT_HOGLINS, MemoryModuleType.NEAREST_VISIBLE_ADULT, MemoryModuleType.NEAREST_REPELLENT, MemoryModuleType.PACIFIED, MemoryModuleType.IS_PANICKING}); ++ // 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_PIGLIN, new MemoryModuleType[]{MemoryModuleType.AVOID_TARGET, MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, MemoryModuleType.NEAREST_VISIBLE_ADULT_HOGLINS, MemoryModuleType.NEAREST_VISIBLE_ADULT, MemoryModuleType.NEAREST_REPELLENT, MemoryModuleType.PACIFIED, MemoryModuleType.IS_PANICKING}); + + public EntityHoglin(EntityTypes entitytypes, World world) { + super(entitytypes, world); +@@ -134,7 +135,7 @@ + + @Override + public BehaviorController getBrain() { +- return super.getBrain(); ++ return (BehaviorController) super.getBrain(); // CraftBukkit - decompile error + } + + @Override +@@ -242,7 +243,7 @@ + private void finishConversion() { + this.convertTo(EntityTypes.ZOGLIN, ConversionParams.single(this, true, false), (entityzoglin) -> { + entityzoglin.addEffect(new MobEffect(MobEffects.CONFUSION, 200, 0)); +- }); ++ }, org.bukkit.event.entity.EntityTransformEvent.TransformReason.PIGLIN_ZOMBIFIED, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.PIGLIN_ZOMBIFIED); // CraftBukkit - add spawn and transform reasons + } + + @Override +@@ -326,7 +327,7 @@ + + @Override + protected SoundEffect getAmbientSound() { +- return this.level().isClientSide ? null : (SoundEffect) HoglinAI.getSoundForCurrentActivity(this).orElse((Object) null); ++ return this.level().isClientSide ? null : (SoundEffect) HoglinAI.getSoundForCurrentActivity(this).orElse(null); // CraftBukkit - decompile error + } + + @Override