Closed Shadows-of-Fire closed 1 year ago
Per the title, InC is not firing the SpecialSpawn event, so other mods cannot react to InC-spawned mobs. Offending code is here https://github.com/McJtyMods/InControl/blob/1.18/src/main/java/mcjty/incontrol/spawner/SpawnerSystem.java#L170
The relevant vanilla code is (from NaturalSpawner L183-190 with some parts omitted)
int canSpawn = net.minecraftforge.common.ForgeHooks.canEntitySpawn(mob, pLevel, d0, i, d1, null, MobSpawnType.NATURAL); if (canSpawn != -1 && (canSpawn == 1 || isValidPositionForMob(pLevel, mob, d2))) { if (!net.minecraftforge.event.ForgeEventFactory.doSpecialSpawn(mob, (LevelAccessor) pLevel, (float)d0, (float)i, (float)d1, null, MobSpawnType.NATURAL)) spawngroupdata = mob.finalizeSpawn(pLevel, pLevel.getCurrentDifficultyAt(mob.blockPosition()), MobSpawnType.NATURAL, spawngroupdata, (CompoundTag)null); pLevel.addFreshEntityWithPassengers(mob);
This issue is also present in 1.19 (and likely others) https://github.com/McJtyMods/InControl/blob/1.19/src/main/java/mcjty/incontrol/spawner/SpawnerSystem.java#L170
Should be fixed now
Per the title, InC is not firing the SpecialSpawn event, so other mods cannot react to InC-spawned mobs. Offending code is here https://github.com/McJtyMods/InControl/blob/1.18/src/main/java/mcjty/incontrol/spawner/SpawnerSystem.java#L170
The relevant vanilla code is (from NaturalSpawner L183-190 with some parts omitted)