[add] Rat Spawning
This commit is contained in:
@@ -39,6 +39,9 @@ public class ModSpawnPlacements {
|
||||
event.register(ModEntities.DUCK.get(), SpawnPlacementTypes.ON_GROUND,
|
||||
Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, Animal::checkAnimalSpawnRules,
|
||||
RegisterSpawnPlacementsEvent.Operation.REPLACE);
|
||||
event.register(ModEntities.RAT.get(), SpawnPlacementTypes.ON_GROUND,
|
||||
Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, Animal::checkAnimalSpawnRules,
|
||||
RegisterSpawnPlacementsEvent.Operation.REPLACE);
|
||||
|
||||
event.register(ModEntities.SHARK.get(), SpawnPlacementTypes.IN_WATER,
|
||||
Heightmap.Types.OCEAN_FLOOR, WaterAnimal::checkSurfaceWaterAnimalSpawnRules,
|
||||
|
||||
@@ -31,6 +31,7 @@ public class ModBiomeModifiers {
|
||||
public static final ResourceKey<BiomeModifier> SPAWN_MONKEY = registerKey("spawn_monkey");
|
||||
public static final ResourceKey<BiomeModifier> SPAWN_CAPYBARA = registerKey("spawn_capybara");
|
||||
public static final ResourceKey<BiomeModifier> SPAWN_DUCK = registerKey("spawn_duck");
|
||||
public static final ResourceKey<BiomeModifier> SPAWN_RAT = registerKey("spawn_rat");
|
||||
|
||||
public static void bootstrap(BootstrapContext<BiomeModifier> context) {
|
||||
var placedFeatures = context.lookup(Registries.PLACED_FEATURE);
|
||||
@@ -111,6 +112,10 @@ public class ModBiomeModifiers {
|
||||
biomes.getOrThrow(Biomes.SUNFLOWER_PLAINS),
|
||||
biomes.getOrThrow(Biomes.MEADOW)),
|
||||
ModEntities.DUCK.get(), 5, 2, 3);
|
||||
|
||||
addSpawn(context, SPAWN_RAT,
|
||||
biomes.getOrThrow(BiomeTags.IS_FOREST),
|
||||
ModEntities.RAT.get(), 3, 2, 3);
|
||||
}
|
||||
|
||||
private static void addSpawn(BootstrapContext<BiomeModifier> context, ResourceKey<BiomeModifier> key,
|
||||
|
||||
Reference in New Issue
Block a user