25 lines
1.0 KiB
Java
25 lines
1.0 KiB
Java
package net.minecraft.world.level.levelgen.placement;
|
|
|
|
import java.util.stream.Stream;
|
|
import net.minecraft.core.BlockPos;
|
|
import java.util.Random;
|
|
import net.minecraft.world.level.levelgen.ChunkGeneratorSettings;
|
|
import net.minecraft.world.level.chunk.ChunkGenerator;
|
|
import net.minecraft.world.level.LevelAccessor;
|
|
import com.mojang.datafixers.Dynamic;
|
|
import java.util.function.Function;
|
|
import net.minecraft.world.level.levelgen.feature.configurations.DecoratorConfiguration;
|
|
|
|
public abstract class SimpleFeatureDecorator<DC extends DecoratorConfiguration> extends FeatureDecorator<DC> {
|
|
public SimpleFeatureDecorator(final Function<Dynamic<?>, ? extends DC> function) {
|
|
super(function);
|
|
}
|
|
|
|
@Override
|
|
public final Stream<BlockPos> getPositions(final LevelAccessor bju, final ChunkGenerator<? extends ChunkGeneratorSettings> bzx, final Random random, final DC cgh, final BlockPos fk) {
|
|
return this.place(random, cgh, fk);
|
|
}
|
|
|
|
protected abstract Stream<BlockPos> place(final Random random, final DC cgh, final BlockPos fk);
|
|
}
|