McJtyMods/InControl

Allow onjoin doesn't work after Deny onjoin

Closed this issue · 2 comments

Mod version : incontrol-1.20-9.2.6

Issue : Allowing a mob to appear with game stages works fine with "position" and "finalize" but doesn't work when using "onjoin". In the case below, the mob will not spawn even when I have the correct stage.

[
  {
	"mob": ["minecraft:wither"],
	"when": "onjoin",
	"result": "deny"
  },
  {
	"mob": ["minecraft:wither"],
	"gamestage": "wither",
	"when": "onjoin",
	"result": "allow"
  }
  ]

This is explained in the documentation. Rules are executed from top to bottom. First rule that matches is executed. You need to swap your two rules

That was indeed the case, it didn't work at first when I swapped it because I used the "continue" key in the actual script but now that I removed that too, it's working perfectly. Now I understand the mod better and sorry for the useless issue.