API fixes

This commit is contained in:
Frank 2022-12-03 13:44:03 +01:00
parent 5c7ac126ed
commit e115141a3b
4 changed files with 13 additions and 12 deletions

View file

@ -287,7 +287,7 @@ public abstract class BCLFeatureBuilder<F extends Feature<FC>, FC extends Featur
return res;
}
public static void registerAll(BootstapContext<ConfiguredFeature<?, ?>> bootstapContext) {
public static void registerUnbound(BootstapContext<ConfiguredFeature<?, ?>> bootstapContext) {
ALL_UNREGISTERED.forEach(u -> u.register(bootstapContext));
}

View file

@ -78,14 +78,4 @@ public class BCLInlinePlacedBuilder<F extends Feature<FC>, FC extends FeatureCon
}
public BCLFeatureBuilder.RandomPatch inRandomPatch(ResourceLocation id) {
return BCLFeatureBuilder.startRandomPatch(id, build().getPlacedFeature());
}
public BCLFeatureBuilder.RandomPatch randomBonemealDistribution(ResourceLocation id) {
return inRandomPatch(id)
.tries(9)
.spreadXZ(3)
.spreadY(1);
}
}

View file

@ -429,4 +429,15 @@ abstract class CommonPlacedFeatureBuilder<F extends Feature<FC>, FC extends Feat
* @return created {@link PlacedFeature} instance.
*/
abstract BCLFeature.Unregistered<F, FC> build();
public BCLFeatureBuilder.RandomPatch inRandomPatch(ResourceLocation id) {
return BCLFeatureBuilder.startRandomPatch(id, build().getPlacedFeature());
}
public BCLFeatureBuilder.RandomPatch randomBonemealDistribution(ResourceLocation id) {
return inRandomPatch(id)
.tries(9)
.spreadXZ(3)
.spreadY(1);
}
}

View file

@ -35,7 +35,7 @@ public class TestConfiguredFeatures {
BCLib.LOGGER.info("Bootstrap CONFIGUREDFeatures" + holder);
if (BCLibDatagen.ADD_TESTS && BCLib.isDevEnvironment()) {
//YELLOW_FEATURE = YELLOW_FEATURE.register(bootstrapContext);
BCLFeatureBuilder.registerAll(bootstrapContext);
BCLFeatureBuilder.registerUnbound(bootstrapContext);
}
}
}