Merge branch '1.20.1' into 1.20.2

# Conflicts:
#	src/main/java/com/minelittlepony/unicopia/datagen/providers/UAdvancementsProvider.java
#	src/main/java/com/minelittlepony/unicopia/recipe/ZapAppleRecipe.java
This commit is contained in:
Sollace 2024-10-14 18:49:28 +01:00
commit 378cb34f83
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB
2 changed files with 10 additions and 6 deletions

View file

@ -67,6 +67,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(AdvancementRequirements.CriterionMerger.OR);
} }
return builder.build(consumer, race.getId().getPath() + "_route"); return builder.build(consumer, race.getId().getPath() + "_route");
@ -117,17 +118,17 @@ public class UAdvancementsProvider extends FabricAdvancementProvider {
p.child(UItems.LIGHTNING_JAR).hidden().frame(AdvancementFrame.CHALLENGE).apply(d -> applyLightningBugCriterions(d, RacePredicate.of(Set.of(Race.CHANGELING), Set.of()), 10, 90)).build(consumer, "lightning_bug"); p.child(UItems.LIGHTNING_JAR).hidden().frame(AdvancementFrame.CHALLENGE).apply(d -> applyLightningBugCriterions(d, RacePredicate.of(Set.of(Race.CHANGELING), Set.of()), 10, 90)).build(consumer, "lightning_bug");
p.child(UItems.LIGHTNING_JAR).hidden().frame(AdvancementFrame.CHALLENGE).apply(d -> applyLightningBugCriterions(d, RacePredicate.of(Set.of(), Set.of(Race.CHANGELING)), 10, 90)).build(consumer, "wonder_bolt"); p.child(UItems.LIGHTNING_JAR).hidden().frame(AdvancementFrame.CHALLENGE).apply(d -> applyLightningBugCriterions(d, RacePredicate.of(Set.of(), Set.of(Race.CHANGELING)), 10, 90)).build(consumer, "wonder_bolt");
}); });
parent.child(UItems.PEGASUS_FEATHER).hidden().frame(AdvancementFrame.CHALLENGE).criterion("shed_feather", CustomEventCriterion.createFlying("shed_feather")).rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "molting_season_1") parent.child(UItems.PEGASUS_FEATHER).hidden().frame(AdvancementFrame.TASK).criterion("shed_feather", CustomEventCriterion.createFlying("shed_feather")).rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "molting_season_1")
.child(UItems.PEGASUS_FEATHER).apply(d -> applyShedFeatherCriterions(d, 2, 2)).build(consumer, "molting_season_2") .child(UItems.PEGASUS_FEATHER).apply(d -> applyShedFeatherCriterions(d, 2, 2)).build(consumer, "molting_season_2")
.child(UItems.PEGASUS_FEATHER).apply(d -> applyShedFeatherCriterions(d, 4, 8)).build(consumer, "molting_season_3") .child(UItems.PEGASUS_FEATHER).apply(d -> applyShedFeatherCriterions(d, 4, 8)).build(consumer, "molting_season_3")
.child(UItems.PEGASUS_FEATHER).apply(d -> applyShedFeatherCriterions(d, 8, 20)).build(consumer, "molting_season_4") .child(UItems.PEGASUS_FEATHER).apply(d -> applyShedFeatherCriterions(d, 8, 20)).build(consumer, "molting_season_4")
.child(UItems.PEGASUS_FEATHER).apply(d -> applyShedFeatherCriterions(d, 16, 40)).build(consumer, "molting_season_5") .child(UItems.PEGASUS_FEATHER).apply(d -> applyShedFeatherCriterions(d, 16, 40)).build(consumer, "molting_season_5")
.child(UItems.PEGASUS_FEATHER).apply(d -> applyShedFeatherCriterions(d, 32, 80)).build(consumer, "molting_season_6") .child(UItems.PEGASUS_FEATHER).apply(d -> applyShedFeatherCriterions(d, 32, 80)).build(consumer, "molting_season_6")
.child(UItems.PEGASUS_FEATHER).apply(d -> applyShedFeatherCriterions(d, 64, 200)).build(consumer, "molting_season_7") .child(UItems.PEGASUS_FEATHER).apply(d -> applyShedFeatherCriterions(d, 64, 200)).build(consumer, "molting_season_7")
.child(UItems.PEGASUS_FEATHER).apply(d -> applyShedFeatherCriterions(d, 128, 500)).build(consumer, "molting_season_8") .child(UItems.PEGASUS_FEATHER).apply(d -> applyShedFeatherCriterions(d, 128, 500)).frame(AdvancementFrame.CHALLENGE).build(consumer, "molting_season_8")
.child(UItems.PEGASUS_FEATHER).apply(d -> applyShedFeatherCriterions(d, 256, 1000)).build(consumer, "molting_season_9") .child(UItems.PEGASUS_FEATHER).apply(d -> applyShedFeatherCriterions(d, 256, 1000)).frame(AdvancementFrame.CHALLENGE).build(consumer, "molting_season_9")
.child(UItems.PEGASUS_FEATHER).apply(d -> applyShedFeatherCriterions(d, 512, 2280)).build(consumer, "molting_season_10") .child(UItems.PEGASUS_FEATHER).apply(d -> applyShedFeatherCriterions(d, 512, 2280)).frame(AdvancementFrame.CHALLENGE).build(consumer, "molting_season_10")
.child(UItems.GOLDEN_FEATHER).apply(d -> applyShedFeatherCriterions(d, 1024, 4560)).build(consumer, "molting_season_11") .child(UItems.GOLDEN_FEATHER).apply(d -> applyShedFeatherCriterions(d, 1024, 4560)).frame(AdvancementFrame.CHALLENGE).build(consumer, "molting_season_11")
.child(UItems.GOLDEN_FEATHER).apply(d -> applyShedFeatherCriterions(d, 2048, 10000)).frame(AdvancementFrame.GOAL).build(consumer, "dedicated_flier"); .child(UItems.GOLDEN_FEATHER).apply(d -> applyShedFeatherCriterions(d, 2048, 10000)).frame(AdvancementFrame.GOAL).build(consumer, "dedicated_flier");
} }

View file

@ -167,7 +167,10 @@ public class CloudCarver extends CaveCarver {
MutableBoolean replacedGrassy MutableBoolean replacedGrassy
) { ) {
if (super.carveAtPoint(context, config, chunk, posToBiome, mask, pos, tmp, aquiferSampler, replacedGrassy)) { if (super.carveAtPoint(context, config, chunk, posToBiome, mask, pos, tmp, aquiferSampler, replacedGrassy)) {
topWrittenPositions.remove(tmp.set(pos).move(Direction.DOWN).asLong()); tmp.set(pos).move(Direction.DOWN);
if (!topWrittenPositions.isEmpty()) {
topWrittenPositions.remove(tmp.asLong());
}
topWrittenPositions.add(pos.asLong()); topWrittenPositions.add(pos.asLong());
if (chunk.getBlockState(tmp).isOf(UBlocks.SOGGY_CLOUD)) { if (chunk.getBlockState(tmp).isOf(UBlocks.SOGGY_CLOUD)) {
chunk.setBlockState(tmp, UBlocks.CLOUD.getDefaultState(), false); chunk.setBlockState(tmp, UBlocks.CLOUD.getDefaultState(), false);