Paper/nms-patches/ChunkGeneratorAbstract.patch

33 lines
1.5 KiB
Diff
Raw Normal View History

2020-06-25 02:00:00 +02:00
--- a/net/minecraft/server/ChunkGeneratorAbstract.java
+++ b/net/minecraft/server/ChunkGeneratorAbstract.java
2020-08-11 23:00:00 +02:00
@@ -24,7 +24,7 @@
2020-06-25 02:00:00 +02:00
return chunkgeneratorabstract.h;
})).apply(instance, instance.stable(ChunkGeneratorAbstract::new));
});
- private static final float[] i = (float[]) SystemUtils.a((Object) (new float[13824]), (afloat) -> {
+ private static final float[] i = (float[]) SystemUtils.a((new float[13824]), (afloat) -> { // CraftBukkit - decompile error
for (int i = 0; i < 24; ++i) {
for (int j = 0; j < 24; ++j) {
for (int k = 0; k < 24; ++k) {
2020-08-11 23:00:00 +02:00
@@ -34,7 +34,7 @@
2020-06-25 02:00:00 +02:00
}
});
- private static final float[] j = (float[]) SystemUtils.a((Object) (new float[25]), (afloat) -> {
+ private static final float[] j = (float[]) SystemUtils.a((new float[25]), (afloat) -> { // CraftBukkit - decompile error
for (int i = -2; i <= 2; ++i) {
for (int j = -2; j <= 2; ++j) {
float f = 10.0F / MathHelper.c((float) (i * i + j * j) + 0.2F);
2020-08-11 23:00:00 +02:00
@@ -193,6 +193,11 @@
2020-06-25 02:00:00 +02:00
f6 = f4;
f7 = f5;
}
+ // CraftBukkit start - fix MC-54738
+ if (f6 < -1.8F) {
+ f6 = -1.8F;
+ }
+ // CraftBukkit end
float f8 = f4 > f3 ? 0.5F : 1.0F;
float f9 = f8 * ChunkGeneratorAbstract.j[l + 2 + (i1 + 2) * 5] / (f6 + 2.0F);