CreeperHost Presents Soul Shards

CreeperHost Presents Soul Shards

3M Downloads

Mod does not respect block spawn rules or Forge CheckSpawn event

robotgryphon opened this issue ยท 6 comments

commented

The spawner does not appear to check Forge's LivingSpawnEvent.CheckSpawn event, nor does it check if blocks overrode isValidSpawn. Looks like the check appears around the following code area:

CageSpawnEvent event = new CageSpawnEvent(binding, inventory.getStackInSlot(0), entityLiving);
if (MinecraftForge.EVENT_BUS.post(event)) continue;

This is causing several mob spawning issues with Compact Machines where enderman/shulkers are outside machine rooms. Adding these event checks would mean other mods can guard against spawns without specific compat code.

commented

Would this also be why soul cages stop spawning when players move more than 128 blocks away, even when using chunk loaders? (tested with both FTB Chunks and Chunk Loaders).

Playing Direwolf20 1.18 pack, and everything seems ok except when I move beyond 128 blocks from the spawner, even for a tier 5.

commented

pretty sure my issue is not specific to soul shards. Seeing the same thing with dreadful dirt and agitators. if it is related, then it's some odd interaction between forge and 1.18 spawning mechanics. Opened an FTB issue here:

FTBTeam/FTB-Modpack-Issues#922

commented

Would this also be why soul cages stop spawning when players move more than 128 blocks away, even when using chunk loaders? (tested with both FTB Chunks and Chunk Loaders).

Playing Direwolf20 1.18 pack, and everything seems ok except when I move beyond 128 blocks from the spawner, even for a tier 5.

This is a different issue and will need to be opened as a new issue however since we don't check if a player is nearby in higher tier soul shards this sounds like a chunk loading issue

commented

The spawner does not appear to check Forge's LivingSpawnEvent.CheckSpawn event, nor does it check if blocks overrode isValidSpawn. Looks like the check appears around the following code area:

CageSpawnEvent event = new CageSpawnEvent(binding, inventory.getStackInSlot(0), entityLiving);
if (MinecraftForge.EVENT_BUS.post(event)) continue;

This is causing several mob spawning issues with Compact Machines where enderman/shulkers are outside machine rooms. Adding these event checks would mean other mods can guard against spawns without specific compat code.

I'm still trying to figure out a good way to implement this, The entire point of a T5 shard is that it ignores spawn conditions, Still trying to figure out how to do this without breaking the T5 shard

commented

Might be the reason why a cow shard L1 only spawns cows when it is dark which is counterintuitive.

commented

This should be fixed in later builds of the mod