In Control!

In Control!

72M Downloads

[Suggestion/Bug?] Do not modify the CheckSpawn result if the config is set to "default"

Closed this issue ยท 3 comments

commented

I've got a report regarding the Modpack "Skyfactory 4" in which the matter overdrive mobs keep spawning even though the mega torch from Torchmaster should prevent the spawn.

I was able to track down this issue to the spawning behavior of InControl. @Darkosto added a custom spawn override to the spawn.json which looks like this:

[
  {
    "mob": "matteroverdrive:ranged_rogue_android",
    "result": "default",
    "onjoin": true,
    "nbt": {
      "Attributes": [
        {
          "Base": 18.0,
          "Name": "generic.followRange"
        }
      ]
    }
  }
]

The issue is, Torchmaster relies on the checkspawn event to control if a mob is allowed to spawn at a certain location. I set the result to deny if a torch is in range, otherwise I keep the result as is.

It seems InControl always overrides the event result with the result code from the spawn.json, effectivly overriding my DENY with DEFAULT.


I'm not sure if this could be considered a bug, if it is not, i suggest the following change to the CheckSpawn EventHandler:

  • if the spawn.json specifies a result of DENY or ALLOW, set the value accordingly, no matter what other mods do (This is the current behavior)
  • if the spawn.json specifies a result of DEFAULT, do not modify the event result, effectivly allowing other mods to do their thing.
commented

That's a serious change in behaviour which I can't do without likely breaking many setups. I cannot simply do this. However I could consider allowing not specifying a result in a rule. When a rule has no result the result will not be set. Would that be good?

commented

To me this sounds even better!

commented

Implemented for next release