Skip to content

Instantly share code, notes, and snippets.

@IMB11
Created November 5, 2022 22:10
Show Gist options
  • Save IMB11/30505bcef70a6b2f226c97967a9917f0 to your computer and use it in GitHub Desktop.
Save IMB11/30505bcef70a6b2f226c97967a9917f0 to your computer and use it in GitHub Desktop.
BiomeModifications.create(Woof.id("wolf_additions")).add(ModificationPhase.REPLACEMENTS, biomeSelectionContext -> true, (biomeSelectionContext, biomeModificationContext) -> {
for (Map.Entry<RegistryKey<Variant>, Variant> variantRegistryKey : WoofAPI.VARIANT_REGISTRY.getEntrySet()) {
if (!variantRegistryKey.getValue().biomePredicate().apply(biomeSelectionContext.getBiomeRegistryEntry()))
continue;
biomeModificationContext.getSpawnSettings().removeSpawnsOfEntityType(EntityType.WOLF);
biomeModificationContext.getSpawnSettings().addSpawn(SpawnGroup.MISC, new SpawnSettings.SpawnEntry(EntityType.WOLF, 5, 1, 2));
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment