PaperMC/paper-server/nms-patches/net/minecraft/world/level/chunk/ChunkSection.patch
CraftBukkit/Spigot 40076782ed Update to Minecraft 1.19.4
By: md_5 <git@md-5.net>
2023-03-15 03:30:00 +11:00

29 lines
1.3 KiB
Diff

--- a/net/minecraft/world/level/chunk/ChunkSection.java
+++ b/net/minecraft/world/level/chunk/ChunkSection.java
@@ -25,9 +25,11 @@
private short tickingBlockCount;
private short tickingFluidCount;
private final DataPaletteBlock<IBlockData> states;
- private PalettedContainerRO<Holder<BiomeBase>> biomes;
+ // CraftBukkit start - read/write
+ private DataPaletteBlock<Holder<BiomeBase>> biomes;
- public ChunkSection(int i, DataPaletteBlock<IBlockData> datapaletteblock, PalettedContainerRO<Holder<BiomeBase>> palettedcontainerro) {
+ public ChunkSection(int i, DataPaletteBlock<IBlockData> datapaletteblock, DataPaletteBlock<Holder<BiomeBase>> palettedcontainerro) {
+ // CraftBukkit end
this.bottomBlockY = getBottomBlockY(i);
this.states = datapaletteblock;
this.biomes = palettedcontainerro;
@@ -200,6 +202,12 @@
return (Holder) this.biomes.get(i, j, k);
}
+ // CraftBukkit start
+ public void setBiome(int i, int j, int k, Holder<BiomeBase> biome) {
+ this.biomes.set(i, j, k, biome);
+ }
+ // CraftBukkit end
+
public void fillBiomesFromNoise(BiomeResolver biomeresolver, Climate.Sampler climate_sampler, int i, int j) {
DataPaletteBlock<Holder<BiomeBase>> datapaletteblock = this.biomes.recreate();
int k = QuartPos.fromBlock(this.bottomBlockY());