Edge biomes (#7001)

This commit is contained in:
Jenny authored and GitHub committed 2021-07-22 03:10:41 +02:00
1 parent 6807c294c4
commit 38a9fe304c
2 files changed
+19 -2

No files matched your search

@@ -41,7 +41,7 @@
return true;
}
}
@@ -375,6 +375,17 @@
@@ -375,6 +375,22 @@
return this.field_185364_H;
}
@@ -55,11 +55,16 @@
+ public Biome getHill(net.minecraft.world.gen.INoiseRandom rand) {
+ return null;
+ }
+
+ @Nullable
+ public Biome getEdge(net.minecraft.world.gen.INoiseRandom rand, Biome northBiome, Biome westBiome, Biome southBiome, Biome eastBiome) {
+ return null;
+ }
+
public static class Builder {
@Nullable
private ConfiguredSurfaceBuilder<?> field_205422_a;
@@ -526,6 +537,18 @@
@@ -526,6 +542,18 @@
}
}
@@ -0,0 +1,12 @@
--- a/net/minecraft/world/gen/layer/ShoreLayer.java
+++ b/net/minecraft/world/gen/layer/ShoreLayer.java
@@ -34,6 +34,9 @@
public int func_202748_a(INoiseRandom p_202748_1_, int p_202748_2_, int p_202748_3_, int p_202748_4_, int p_202748_5_, int p_202748_6_) {
Biome biome = Registry.field_212624_m.func_148745_a(p_202748_6_);
+ Biome edgeBiome = biome.getEdge(p_202748_1_, Registry.field_212624_m.func_148745_a(p_202748_2_), Registry.field_212624_m.func_148745_a(p_202748_3_), Registry.field_212624_m.func_148745_a(p_202748_4_), Registry.field_212624_m.func_148745_a(p_202748_5_));
+ if (edgeBiome != null) return Registry.field_212624_m.func_148757_b(edgeBiome);
+
if (p_202748_6_ == field_202784_r) {
if (LayerUtil.func_203631_b(p_202748_2_) || LayerUtil.func_203631_b(p_202748_3_) || LayerUtil.func_203631_b(p_202748_4_) || LayerUtil.func_203631_b(p_202748_5_)) {
return field_202785_s;