Allow usage of BCLStructureFeature to add Structures
This commit is contained in:
parent
e7b66af02e
commit
1365339c1e
1 changed files with 9 additions and 6 deletions
|
@ -497,14 +497,17 @@ public class BiomeAPI {
|
|||
BuiltinRegistries.CONFIGURED_STRUCTURE_FEATURE.getResourceKey(structure)
|
||||
.ifPresent((key)->
|
||||
BiomeModifications.addStructure(
|
||||
(ctx)-> ctx.getBiomeKey().location()
|
||||
.equals(BuiltinRegistries.BIOME.getKey(biome)),
|
||||
(ctx)-> ctx.getBiomeKey().location().equals(BuiltinRegistries.BIOME.getKey(biome)),
|
||||
key
|
||||
));
|
||||
// BiomeGenerationSettingsAccessor accessor = (BiomeGenerationSettingsAccessor) biome.getGenerationSettings();
|
||||
// List<Supplier<ConfiguredStructureFeature<?, ?>>> biomeStructures = getMutableList(accessor.fabric_getStructureFeatures());
|
||||
// biomeStructures.add(() -> structure);
|
||||
// accessor.fabric_setStructureFeatures(biomeStructures);
|
||||
}
|
||||
/**
|
||||
* Adds new structure feature to existing biome.
|
||||
* @param biome {@link Biome} to add structure feature in.
|
||||
* @param structure {@link BCLStructureFeature} to add.
|
||||
*/
|
||||
public static void addBiomeStructure(Biome biome, BCLStructureFeature structure) {
|
||||
addBiomeStructure(biome, structure.getFeatureConfigured());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue