[1.8.15] requireGameStages ALL functionality a bit funky
thephoenixlodge opened this issue ยท 3 comments
Not quite sure what's going on exactly, but I'm seeing strange behaviour with the ALL argument for requireGameStages.
Using this script, I get the following outcomes:
https://pastebin.com/PWamZXJX
- with no stages unlocked, both upgraded recipes are available, neither simple recipe is available
- with ONLY diagramIronChestBasic unlocked, both the simple and upgraded basic chestplate recipes are available, neither of the enhanced chestplate recipes are available.
- with ONLY diagramIronChestAdvanced unlocked, both the simple and upgraded enhanced chestplate recipes are avialable, neither of the basic chestplate recipes are available.
- with diagramIronChestBasic AND diagramIronChestAdvanced unlocked, the simple version of the basic recipe and the upgraded version of the enhanced recipe are available. upgraded basic and simple enhanced are not available.
- with ONLY metalSkillBasic unlocked, both upgraded recipes are available, neither simple recipe is available
- with metalSkillBasic AND diagramIronChestBasic unlocked, the only recipe available is the upgraded basic chestplate - which should be available here. Neither version of the enhanced recipes are available
- with metalSkillBasic AND diagramIronChestAdvanced unlocked, the only recipe available is the upgraded enhanced chestplate - which should be available here. Neither version of the basic recipes are available
- with metalSkillBasic AND diagramIronChestBasic AND diagramIronChestAdvanced unlocked, NONE of the four recipes are available.
So overall, the simple recipes seem to be working fine (they use the ANY variable) but the upgraded recipes are all over the place.
Yeah, it looks like I fumbled some logic.
I had:
return this.include.containsAll(unlockedStages);
This would only return true if the player had unlocked all, but only all and no others.
It should be:
return unlockedStages.containsAll(this.include);
This will return true if the player has unlocked at least all.
Please verify that it now behaves as expected in 1.12.2-1.8.16. I'll leave this open until it's a confirmed fix.
Thanks for catching that! :)