Change criterion check to an OR for tribe joins

This commit is contained in:
Sollace 2024-10-13 18:18:50 +01:00
parent 536cdf99d4
commit 39597a0a1c
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -22,6 +22,7 @@ import net.minecraft.advancement.AdvancementCriterion;
import net.minecraft.advancement.AdvancementEntry; import net.minecraft.advancement.AdvancementEntry;
import net.minecraft.advancement.AdvancementFrame; import net.minecraft.advancement.AdvancementFrame;
import net.minecraft.advancement.AdvancementRequirements; import net.minecraft.advancement.AdvancementRequirements;
import net.minecraft.advancement.AdvancementRequirements.CriterionMerger;
import net.minecraft.advancement.AdvancementRewards; import net.minecraft.advancement.AdvancementRewards;
import net.minecraft.advancement.criterion.ConsumeItemCriterion; import net.minecraft.advancement.criterion.ConsumeItemCriterion;
import net.minecraft.advancement.criterion.Criteria; import net.minecraft.advancement.criterion.Criteria;
@ -74,6 +75,7 @@ public class UAdvancementsProvider extends FabricAdvancementProvider {
for (Race r : extra) { for (Race r : extra) {
builder.criterion("be_" + r.getId().getPath(), UCriteria.PLAYER_CHANGE_RACE.create(new RaceChangeCriterion.Conditions(Optional.empty(), r))); builder.criterion("be_" + r.getId().getPath(), UCriteria.PLAYER_CHANGE_RACE.create(new RaceChangeCriterion.Conditions(Optional.empty(), r)));
} }
builder.criteriaMerger(CriterionMerger.OR);
} }
return builder.build(consumer, race.getId().getPath() + "_route"); return builder.build(consumer, race.getId().getPath() + "_route");