In Control!

In Control!

72M Downloads

[Error] - Gamestage condition issue for Experience.json [1.16/1.18]

Dialupman opened this issue ยท 1 comments

commented

Tl/Dr: Getting "Invalid keyword" errors for the gamestage condition within Experience. Missing from ExperienceRule.java?

Good evening!
I am trying to develop a Game stage based modpack in 1.16.5 and thought to use InControl's experience module to assist with how much experience is dropped based on Game stages earned/purchased by the players and further modified by held items. The code works well enough without using the gamestage condition, but every time I attempt to use it, I get an "Invalid keyword" error.

Here is my test code:

[
	{
		"fakeplayer": true,
		"result": "deny"
	},
	{
		"realplayer": true,
		"passive": true,
		"gamestage": "hunterexp",
		"bothhandsitem": "minecraft:wooden_sword",
		"multxp": 3
	},
	{
		"realplayer": true,
		"passive": true,
		"gamestage": "hunterexp",
		"addxp": 10
	},
	{
		"realplayer": true,
		"passive": false,
		"gamestage": "mobexp",
		"addxp": 10
	},
	{
		"realplayer": true,
		"gamestage": "noEXP",
		"result": "deny"
	}
]

Given that the wiki shows gamestage as compatible, I peeked into the code and found ".attribute(Attribute.create(GAMESTAGE))" is not present in the list of available keywords on both the 1.16 and 1.18 versions of ExperienceRule.java, but is present in other modules, such as SpawnRule and LootRule. Unless I am doing something incorrect with the code, this is my guess as to the cause of the issue. If not, I request the condition be added to the experience module. I plan to use InControl for both mob spawning and loot lists in conjunction with Game stages, so it would be a shame if I had to find another experience solution.
Thank you for your time!

commented

Sorry for late reply. I'll plan this