VillagerQuests

VillagerQuests

41.6k Downloads

The button has been unable to click.

yyz729 opened this issue ยท 5 comments

commented

The button has been unable to click. Is there an error in the data package? The version is 1.0.3 of 1.18.2.

commented

I used this version just fine may be didnt coded the .json files you can howerver check 5he .json file through https://jsonlint.com/ and paste your .json code to check tif its valid code let us know if you found something !

commented

Could be a couple of reasons but gamingoninsulin already mentioned the most possible one.
If you give more info zhao, then we can help better

commented

I'm running on the same versions... and I can't seem to figure out how to get the villagers to pickup any quests. I've added a dozen or so villagers in a test map, and added 3 quests for testing. Any tips for debugging this? ... When I look at the villager data.... I only see "QuestIds[I;]" which makes me think it isn't getting the quests... and I've tried to manually assign a quest ID to a villager, but it immediately disappears.

Any help would be greatly appreciated.

commented

Digging through the code, and doing some testing I noticed that the "newQuestTicker" is always -1... and the ticker doesn't know what to do when it reaches -1. I modified the tickMixin function on the VillagerEntityMixin,

            if (this.newQuestTicker == -1) {
                MerchantQuests.addRandomMerchantQuests(merchantEntity, 1);
                this.newQuestTicker = VillagerQuestsMain.CONFIG.newQuestTimer + this.merchantEntity.world.random.nextInt(VillagerQuestsMain.CONFIG.newQuestTimer);
            }

Not sure if this is correct, but I did see the villagers picking up quests now... and I was able to complete them.

commented

The issue with getting new quests for villagers is, the villager gets firstly quests on initialization not when new quests are added via datapacks. The newQuestTicker is only used if the player finished a quest for the specific villager. With 4383f3d the villager has initially a timer which runs down, after initialization this can't get changed either, only applies on new ones