Paper/nms-patches/BiomeStorage.patch

36 lines
1.2 KiB
Diff
Raw Normal View History

2019-12-10 23:00:00 +01:00
--- a/net/minecraft/server/BiomeStorage.java
+++ b/net/minecraft/server/BiomeStorage.java
2019-12-17 22:00:00 +01:00
@@ -88,7 +88,7 @@
int[] aint = new int[this.g.length];
2019-12-10 23:00:00 +01:00
2019-12-17 22:00:00 +01:00
for (int i = 0; i < this.g.length; ++i) {
- aint[i] = IRegistry.BIOME.a((Object) this.g[i]);
+ aint[i] = IRegistry.BIOME.a(this.g[i]); // CraftBukkit - decompile error
2019-12-10 23:00:00 +01:00
}
return aint;
2019-12-17 22:00:00 +01:00
@@ -101,7 +101,7 @@
2019-12-10 23:00:00 +01:00
for (int j = 0; j < i; ++j) {
BiomeBase biomebase = abiomebase[j];
- packetdataserializer.writeInt(IRegistry.BIOME.a((Object) biomebase));
+ packetdataserializer.writeInt(IRegistry.BIOME.a(biomebase)); // CraftBukkit - decompile error
}
}
2019-12-17 22:00:00 +01:00
@@ -118,4 +118,14 @@
2019-12-10 23:00:00 +01:00
2019-12-17 22:00:00 +01:00
return this.g[i1 << BiomeStorage.e + BiomeStorage.e | j1 << BiomeStorage.e | l];
2019-12-10 23:00:00 +01:00
}
+
+ // CraftBukkit start
+ public void setBiome(int i, int j, int k, BiomeBase biome) {
+ int l = i & BiomeStorage.b;
+ int i1 = MathHelper.clamp(j, 0, BiomeStorage.c);
+ int j1 = k & BiomeStorage.b;
+
2019-12-17 22:00:00 +01:00
+ this.g[i1 << BiomeStorage.e + BiomeStorage.e | j1 << BiomeStorage.e | l] = biome;
2019-12-10 23:00:00 +01:00
+ }
+ // CraftBukkit end
}