mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-25 06:24:43 +00:00
Fix data pack biomes failing to load in SingleBiomeProvider (#7434)
This commit is contained in:
1 parent
6982c5dd56
commit
8a77681574
4 files changed
+53
-7
No files matched your search
@@ -875,13 +875,13 @@ public class ForgeHooks
|
||||
Biome apply(final Biome.Climate climate, final Biome.Category category, final Float depth, final Float scale, final BiomeAmbience effects, final BiomeGenerationSettings gen, final MobSpawnInfo spawns);
|
||||
}
|
||||
|
||||
public static Biome enhanceBiome(final ResourceLocation name, final Biome.Climate climate, final Biome.Category category, final Float depth, final Float scale, final BiomeAmbience effects, final BiomeGenerationSettings gen, final MobSpawnInfo spawns, final RecordCodecBuilder.Instance<Biome> codec, final BiomeCallbackFunction callback)
|
||||
public static Biome enhanceBiome(@Nullable final ResourceLocation name, final Biome.Climate climate, final Biome.Category category, final Float depth, final Float scale, final BiomeAmbience effects, final BiomeGenerationSettings gen, final MobSpawnInfo spawns, final RecordCodecBuilder.Instance<Biome> codec, final BiomeCallbackFunction callback)
|
||||
{
|
||||
BiomeGenerationSettingsBuilder genBuilder = new BiomeGenerationSettingsBuilder(gen);
|
||||
MobSpawnInfoBuilder spawnBuilder = new MobSpawnInfoBuilder(spawns);
|
||||
BiomeLoadingEvent event = new BiomeLoadingEvent(name, climate, category, depth, scale, effects, genBuilder, spawnBuilder);
|
||||
MinecraftForge.EVENT_BUS.post(event);
|
||||
return callback.apply(event.getClimate(), event.getCategory(), event.getDepth(), event.getScale(), event.getEffects(), event.getGeneration().func_242508_a(), event.getSpawns().func_242577_b());
|
||||
return callback.apply(event.getClimate(), event.getCategory(), event.getDepth(), event.getScale(), event.getEffects(), event.getGeneration().func_242508_a(), event.getSpawns().func_242577_b()).setRegistryName(name);
|
||||
}
|
||||
|
||||
private static class LootTableContext
|
||||
|
||||
Reference in new issue
Block a user