Added custom processors for end village streets

This commit is contained in:
Frank 2023-06-11 15:11:27 +02:00
parent a5b81f5870
commit f2e8ccabae
5 changed files with 87 additions and 5 deletions

View file

@ -0,0 +1,16 @@
package org.betterx.betterend.registry;
import org.betterx.bclib.api.v3.datagen.ProcessorHelper;
import org.betterx.betterend.BetterEnd;
import net.minecraft.resources.ResourceKey;
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessorList;
public class EndProcessors {
public static final ResourceKey<StructureProcessorList> WEATHERED_10_PERCENT =
ProcessorHelper.createKey(BetterEnd.makeID("weather_10_percent"));
public static final ResourceKey<StructureProcessorList> CRACK_20_PERCENT =
ProcessorHelper.createKey(BetterEnd.makeID("crack_20_percent"));
public static final ResourceKey<StructureProcessorList> CRACK_AND_WEATHER =
ProcessorHelper.createKey(BetterEnd.makeID("crack_and_weather"));
}

View file

@ -2,6 +2,7 @@ package org.betterx.betterend.world.structures.village;
import org.betterx.bclib.api.v2.levelgen.structures.StructurePools;
import org.betterx.betterend.BetterEnd;
import org.betterx.betterend.registry.EndProcessors;
import com.mojang.datafixers.util.Pair;
import net.minecraft.core.Holder;
@ -42,6 +43,10 @@ public class VillagePools {
final Holder.Reference<StructureTemplatePool> emptyPool = poolGetter.getOrThrow(Pools.EMPTY);
final Holder.Reference<StructureTemplatePool> terminatorPool = poolGetter.getOrThrow(VillagePools.TERMINATORS_KEY);
Holder.Reference<StructureProcessorList> mossify = processorGetter.getOrThrow(EndProcessors.WEATHERED_10_PERCENT);
Holder.Reference<StructureProcessorList> crack = processorGetter.getOrThrow(EndProcessors.CRACK_20_PERCENT);
Holder.Reference<StructureProcessorList> crackAndWeather = processorGetter.getOrThrow(EndProcessors.CRACK_AND_WEATHER);
final Holder.Reference<StructureProcessorList> emptyProcessor = processorGetter.getOrThrow(ProcessorLists.EMPTY);
ctx.register(VillagePools.TERMINATORS_KEY, new StructureTemplatePool(
emptyPool,
@ -121,19 +126,19 @@ public class VillagePools {
ctx.register(VillagePools.STREET_KEY, new StructureTemplatePool(
terminatorPool,
ImmutableList.of(Pair.of(
StructurePools.single(BetterEnd.makeID("village/streets/street_01"), emptyProcessor),
StructurePools.single(BetterEnd.makeID("village/streets/street_01"), crackAndWeather),
6
), Pair.of(
StructurePools.single(BetterEnd.makeID("village/streets/street_02"), emptyProcessor),
StructurePools.single(BetterEnd.makeID("village/streets/street_02"), crackAndWeather),
4
), Pair.of(
StructurePools.single(BetterEnd.makeID("village/streets/curve_01"), emptyProcessor),
StructurePools.single(BetterEnd.makeID("village/streets/curve_01"), crackAndWeather),
3
), Pair.of(
StructurePools.single(BetterEnd.makeID("village/streets/t_crossing_01"), emptyProcessor),
StructurePools.single(BetterEnd.makeID("village/streets/t_crossing_01"), crackAndWeather),
1
), Pair.of(
StructurePools.single(BetterEnd.makeID("village/streets/t_crossing_02"), emptyProcessor),
StructurePools.single(BetterEnd.makeID("village/streets/t_crossing_02"), crackAndWeather),
2
)),
StructureTemplatePool.Projection.TERRAIN_MATCHING