Added hook to allow biomes to specify custom river variants. (#5969)
This commit is contained in:
parent
838998b885
commit
56857cf5e7
2 changed files with 29 additions and 1 deletions
|
@ -41,7 +41,20 @@
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -526,6 +526,18 @@
|
@@ -375,6 +375,12 @@
|
||||||
|
return this.field_185364_H;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ public Biome getRiver() {
|
||||||
|
+ if (this == Biomes.field_76774_n) return Biomes.field_76777_m;
|
||||||
|
+ if (this == Biomes.field_76789_p || this == Biomes.field_76788_q) return Biomes.field_76788_q;
|
||||||
|
+ return Biomes.field_76781_i;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
public static class Builder {
|
||||||
|
@Nullable
|
||||||
|
private ConfiguredSurfaceBuilder<?> field_205422_a;
|
||||||
|
@@ -526,6 +532,18 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
--- a/net/minecraft/world/gen/layer/MixRiverLayer.java
|
||||||
|
+++ b/net/minecraft/world/gen/layer/MixRiverLayer.java
|
||||||
|
@@ -22,11 +22,7 @@
|
||||||
|
if (LayerUtil.func_202827_a(i)) {
|
||||||
|
return i;
|
||||||
|
} else if (j == field_202725_h) {
|
||||||
|
- if (i == field_202721_d) {
|
||||||
|
- return field_202720_c;
|
||||||
|
- } else {
|
||||||
|
- return i != field_202722_e && i != field_202723_f ? j & 255 : field_202723_f;
|
||||||
|
- }
|
||||||
|
+ return Registry.field_212624_m.func_148757_b(Registry.field_212624_m.func_148745_a(i).getRiver());
|
||||||
|
} else {
|
||||||
|
return i;
|
||||||
|
}
|
Loading…
Reference in a new issue