Change criterion check to an OR for tribe joins

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

View file

@ -21,6 +21,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;
@ -67,6 +68,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");