Friends & Foes (Forge/NeoForge) (Copper Golem,Crab,Glare,Moobloom,Iceologer,Rascal,Tuff Golem,Wildfire,Illusioner)

Rascal spawn checks are too lenient which often leads them to spawning in places where they are cornerable

Roadhog360 opened this issue ยท 8 comments

commented

Minecraft version information

1.20.1

Mod loader information

Forge

Mod loader version information

47.3.5

Mod version information

2.0.12

Expected Behavior

Rascals would have better spawning conditions that make them less likely to spawn in places where they'd be immediately cornered for a free reward (ie my basement lol)

Actual Behavior

Rascals seemingly have very lenient spawning conditions, leading to the player receiving free loot in some setups pretty easily.

Reproduction Steps

Build a house with a somewhat dark basement. The light level does not even need to be 0.

Screenshots & files

Below are two videos of the rascal exploit happening.
https://github.com/Faboslav/friends-and-foes/assets/11903511/6f110524-daf7-4607-aedc-86ba359ba035
https://github.com/Faboslav/friends-and-foes/assets/11903511/bd293e94-1b33-49c5-ba02-e9554f3c0ab1

Here's what my house looks like, (under construction) I suppose the reproduction steps are "have a house that looks like this"
https://github.com/Faboslav/friends-and-foes/assets/11903511/a26e2ef2-d533-4c79-b226-b318267d56c8

SUGGESTED FIX(ES)

The issue could be mitigated by adding one or more of the following checks:

  • Maximum Y level (suggested 48)
  • Space checks when spawning
  • Spawning in light levels of 0 only (Structures like mineshafts could bypass this)
    • You could also make it so they only spawn in or near mineshafts altogether, with a structure tag for players and modders to add their structures to rascal-spawnable structures?
  • Only spawning on natural stones
  • Spawns further away from the player than other mobs
commented

There actually is a condition to spawn rascal only within mineshaft bounds, which is working fine with vanilla mineshaft, but there is a problem with modded mineshafts i think.

commented

This is strange. I did not know they were actually only supposed to spawn in mine shaft. I see them in random caves all the time. What's the best way to test this? Spawning is randoms, so batch removal testing is going to be very slow and hard to actually verify.

Perhaps the pack I'm using in a Prism instance could work?

It should be also noted that very close to my basement is a mine shaft, although it is about 10 or 20 or so blocks below it. If you want the instance and server, I can tell you more about it on Discord. If you need my pack or server, just let me know and I will give it to you.

It's also worth noting the pack I'm using does not introduce any modded mineshafts.

commented

Don't worry about it, i can probably get the similar result on every world with any mineshaft :). I just need some time to do some testing.

commented

Yeah, i will need to check how big are the bounds of the mineshaft, because that is probably the problem, also its really hard to come up with more conditions, since i cant rely on blocks nor height, since modded mineshafts are just different. I will need to come with something more creative.

commented

Please share your Discord username and I will add you and DM you everything you need to download.

commented

So i tested, and until now rascal could spawn only:

  • within mineshaft tag based structure
  • and below y lvl of 63

I added additional things:

  • light level of 1 or higher
  • surrounding block must be in the planks tag

Which should work even with modded minecraft

commented

Will close this based on the improvement, if wanted, you can join discord and we can discuss more.

commented

Gotcha. I haven't had a chance to update yet, but I'll let you know what I do.