Merge pull request 'bug/13-duplicate_near_water_feature_in_swamps' (#16) from bug/13-duplicate_near_water_feature_in_swamps into 1.20.1
Reviewed-on: #16
This commit is contained in:
@ -0,0 +1,6 @@
|
||||
{
|
||||
"type": "forge:remove_features",
|
||||
"biomes": "#forge:is_swamp",
|
||||
"features": "firefly_bush_backport:patch_firefly_bush_near_water",
|
||||
"steps": "vegetal_decoration"
|
||||
}
|
@ -16,10 +16,13 @@ import net.minecraftforge.common.world.BiomeModifier;
|
||||
import net.minecraftforge.common.world.ForgeBiomeModifiers;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public class ModBiomeModifiers {
|
||||
public static final ResourceKey<BiomeModifier> ADD_PATCH_FIREFLY_BUSH_SWAMP = registerKey("add_patch_firefly_bush_swamp");
|
||||
public static final ResourceKey<BiomeModifier> ADD_PATCH_FIREFLY_BUSH_NEAR_WATER_SWAMP = registerKey("add_patch_firefly_bush_near_water_swamp");
|
||||
public static final ResourceKey<BiomeModifier> ADD_PATCH_FIREFLY_BUSH_NEAR_WATER = registerKey("add_patch_firefly_bush_near_water");
|
||||
public static final ResourceKey<BiomeModifier> REMOVE_PATCH_FIREFLY_BUSH_NEAR_WATER = registerKey("remove_patch_firefly_bush_near_water");
|
||||
|
||||
public static void bootstrap(BootstapContext<BiomeModifier> context) {
|
||||
HolderGetter<PlacedFeature> placedFeatures = context.lookup(Registries.PLACED_FEATURE);
|
||||
@ -42,6 +45,12 @@ public class ModBiomeModifiers {
|
||||
HolderSet.direct(placedFeatures.getOrThrow(ModPlacedFeatures.PATCH_FIREFLY_BUSH_NEAR_WATER_PLACED_KEY)),
|
||||
GenerationStep.Decoration.VEGETAL_DECORATION
|
||||
));
|
||||
|
||||
context.register(REMOVE_PATCH_FIREFLY_BUSH_NEAR_WATER, new ForgeBiomeModifiers.RemoveFeaturesBiomeModifier(
|
||||
biomes.getOrThrow(Tags.Biomes.IS_SWAMP),
|
||||
HolderSet.direct(placedFeatures.getOrThrow(ModPlacedFeatures.PATCH_FIREFLY_BUSH_NEAR_WATER_PLACED_KEY)),
|
||||
Set.of(GenerationStep.Decoration.VEGETAL_DECORATION)
|
||||
));
|
||||
}
|
||||
|
||||
private static ResourceKey<BiomeModifier> registerKey(String name) {
|
||||
|
Reference in New Issue
Block a user