Migrated SoulPlains, MagmaLand and GravelDesert to new Feature style
This commit is contained in:
parent
c14928ea80
commit
e2b7f6849a
1 changed files with 27 additions and 6 deletions
|
@ -26,7 +26,8 @@ public class FastFeatures {
|
||||||
boolean onFloor,
|
boolean onFloor,
|
||||||
boolean sparse,
|
boolean sparse,
|
||||||
ScatterFeatureConfig.Builder builder,
|
ScatterFeatureConfig.Builder builder,
|
||||||
Feature scatterFeature) {
|
Feature scatterFeature
|
||||||
|
) {
|
||||||
BCLFeatureBuilder fBuilder = BCLFeatureBuilder.start(location, scatterFeature);
|
BCLFeatureBuilder fBuilder = BCLFeatureBuilder.start(location, scatterFeature);
|
||||||
if (onFloor) {
|
if (onFloor) {
|
||||||
fBuilder.findSolidFloor(3).isEmptyAbove2();
|
fBuilder.findSolidFloor(3).isEmptyAbove2();
|
||||||
|
@ -58,6 +59,30 @@ public class FastFeatures {
|
||||||
new SimpleBlockConfiguration(BlockStateProvider.simple(block)));
|
new SimpleBlockConfiguration(BlockStateProvider.simple(block)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static BCLFeature
|
||||||
|
simple(ResourceLocation location,
|
||||||
|
int searchDist,
|
||||||
|
boolean rare,
|
||||||
|
Feature<NoneFeatureConfiguration> feature) {
|
||||||
|
return simple(location, searchDist, rare, feature, NoneFeatureConfiguration.NONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <FC extends FeatureConfiguration> BCLFeature
|
||||||
|
simple(ResourceLocation location,
|
||||||
|
int searchDist,
|
||||||
|
boolean rare,
|
||||||
|
Feature<FC> feature,
|
||||||
|
FC config) {
|
||||||
|
BCLFeatureBuilder builder = BCLFeatureBuilder
|
||||||
|
.start(location, feature)
|
||||||
|
.findSolidFloor(Math.min(12, searchDist))
|
||||||
|
.is(BlockPredicate.ONLY_IN_AIR_PREDICATE);
|
||||||
|
if (rare) {
|
||||||
|
builder.onceEvery(4);
|
||||||
|
}
|
||||||
|
return builder.buildAndRegister(config);
|
||||||
|
}
|
||||||
|
|
||||||
public static BCLFeature
|
public static BCLFeature
|
||||||
patch(ResourceLocation location, Feature<NoneFeatureConfiguration> feature) {
|
patch(ResourceLocation location, Feature<NoneFeatureConfiguration> feature) {
|
||||||
return patch(location, 96, 7, 3, feature, FeatureConfiguration.NONE);
|
return patch(location, 96, 7, 3, feature, FeatureConfiguration.NONE);
|
||||||
|
@ -80,11 +105,7 @@ public class FastFeatures {
|
||||||
Feature<FC> feature,
|
Feature<FC> feature,
|
||||||
FC config) {
|
FC config) {
|
||||||
ResourceLocation patchLocation = new ResourceLocation(location.getNamespace(), location.getPath() + "_patch");
|
ResourceLocation patchLocation = new ResourceLocation(location.getNamespace(), location.getPath() + "_patch");
|
||||||
final BCLFeature SINGLE = BCLFeatureBuilder
|
final BCLFeature SINGLE = simple(location, ySpread, false, feature, config);
|
||||||
.start(location, feature)
|
|
||||||
.findSolidFloor(Math.min(12, ySpread))
|
|
||||||
.is(BlockPredicate.ONLY_IN_AIR_PREDICATE)
|
|
||||||
.buildAndRegister(config);
|
|
||||||
|
|
||||||
return BCLFeatureBuilder
|
return BCLFeatureBuilder
|
||||||
.start(patchLocation, Feature.RANDOM_PATCH)
|
.start(patchLocation, Feature.RANDOM_PATCH)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue