0
0
mirror of https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git synced 2024-11-25 05:46:13 +00:00
craftbukkit/nms-patches/net/minecraft/world/level/chunk/ChunkSection.patch
2024-10-23 02:15:00 +11:00

34 lines
1.5 KiB
Diff

--- a/net/minecraft/world/level/chunk/ChunkSection.java
+++ b/net/minecraft/world/level/chunk/ChunkSection.java
@@ -23,7 +23,7 @@
private short tickingBlockCount;
private short tickingFluidCount;
private final DataPaletteBlock<IBlockData> states;
- private PalettedContainerRO<Holder<BiomeBase>> biomes;
+ private DataPaletteBlock<Holder<BiomeBase>> biomes; // CraftBukkit - read/write
private ChunkSection(ChunkSection chunksection) {
this.nonEmptyBlockCount = chunksection.nonEmptyBlockCount;
@@ -33,7 +33,7 @@
this.biomes = chunksection.biomes.copy();
}
- public ChunkSection(DataPaletteBlock<IBlockData> datapaletteblock, PalettedContainerRO<Holder<BiomeBase>> palettedcontainerro) {
+ public ChunkSection(DataPaletteBlock<IBlockData> datapaletteblock, DataPaletteBlock<Holder<BiomeBase>> palettedcontainerro) { // CraftBukkit - read/write
this.states = datapaletteblock;
this.biomes = palettedcontainerro;
this.recalcBlockCounts();
@@ -196,6 +196,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, int k) {
DataPaletteBlock<Holder<BiomeBase>> datapaletteblock = this.biomes.recreate();
boolean flag = true;