Added feature removal for non-swamp near river feature.
This commit is contained in:
@ -16,10 +16,13 @@ import net.minecraftforge.common.world.BiomeModifier;
|
|||||||
import net.minecraftforge.common.world.ForgeBiomeModifiers;
|
import net.minecraftforge.common.world.ForgeBiomeModifiers;
|
||||||
import net.minecraftforge.registries.ForgeRegistries;
|
import net.minecraftforge.registries.ForgeRegistries;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
public class ModBiomeModifiers {
|
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_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_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> 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) {
|
public static void bootstrap(BootstapContext<BiomeModifier> context) {
|
||||||
HolderGetter<PlacedFeature> placedFeatures = context.lookup(Registries.PLACED_FEATURE);
|
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)),
|
HolderSet.direct(placedFeatures.getOrThrow(ModPlacedFeatures.PATCH_FIREFLY_BUSH_NEAR_WATER_PLACED_KEY)),
|
||||||
GenerationStep.Decoration.VEGETAL_DECORATION
|
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) {
|
private static ResourceKey<BiomeModifier> registerKey(String name) {
|
||||||
|
Reference in New Issue
Block a user