39 lines
1.9 KiB
Diff
39 lines
1.9 KiB
Diff
--- ../src-base/minecraft/net/minecraft/world/biome/BiomeProvider.java
|
|
+++ ../src-work/minecraft/net/minecraft/world/biome/BiomeProvider.java
|
|
@@ -22,11 +22,12 @@
|
|
private GenLayer field_76945_e;
|
|
private final BiomeCache field_76942_f;
|
|
private final List<Biome> field_76943_g;
|
|
+ public static List<Biome> allowedBiomes = Lists.newArrayList(Biomes.field_76767_f, Biomes.field_76772_c, Biomes.field_76768_g, Biomes.field_76784_u, Biomes.field_76785_t, Biomes.field_76782_w, Biomes.field_76792_x);
|
|
|
|
protected BiomeProvider()
|
|
{
|
|
this.field_76942_f = new BiomeCache(this);
|
|
- this.field_76943_g = Lists.newArrayList(Biomes.field_76767_f, Biomes.field_76772_c, Biomes.field_76768_g, Biomes.field_76784_u, Biomes.field_76785_t, Biomes.field_76782_w, Biomes.field_76792_x);
|
|
+ this.field_76943_g = Lists.newArrayList(allowedBiomes);
|
|
}
|
|
|
|
private BiomeProvider(long p_i45744_1_, WorldType p_i45744_3_, String p_i45744_4_)
|
|
@@ -39,6 +40,7 @@
|
|
}
|
|
|
|
GenLayer[] agenlayer = GenLayer.func_180781_a(p_i45744_1_, p_i45744_3_, this.field_190945_a);
|
|
+ agenlayer = getModdedBiomeGenerators(p_i45744_3_, p_i45744_1_, agenlayer);
|
|
this.field_76944_d = agenlayer[0];
|
|
this.field_76945_e = agenlayer[1];
|
|
}
|
|
@@ -207,6 +209,13 @@
|
|
this.field_76942_f.func_76838_a();
|
|
}
|
|
|
|
+ public GenLayer[] getModdedBiomeGenerators(WorldType worldType, long seed, GenLayer[] original)
|
|
+ {
|
|
+ net.minecraftforge.event.terraingen.WorldTypeEvent.InitBiomeGens event = new net.minecraftforge.event.terraingen.WorldTypeEvent.InitBiomeGens(worldType, seed, original);
|
|
+ net.minecraftforge.common.MinecraftForge.TERRAIN_GEN_BUS.post(event);
|
|
+ return event.getNewBiomeGens();
|
|
+ }
|
|
+
|
|
public boolean func_190944_c()
|
|
{
|
|
return this.field_190945_a != null && this.field_190945_a.field_177779_F >= 0;
|