Updated to RC2

This commit is contained in:
Frank 2022-06-04 11:39:27 +02:00
parent e2b7f6849a
commit 9496de1438
3 changed files with 9 additions and 7 deletions

View file

@ -22,7 +22,7 @@ import net.minecraft.world.level.biome.MobSpawnSettings.SpawnerData;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.chunk.ChunkAccess;
import net.minecraft.world.level.chunk.ChunkGenerator;
import net.minecraft.world.level.chunk.PalettedContainer;
import net.minecraft.world.level.chunk.PalettedContainerRO;
import net.minecraft.world.level.dimension.LevelStem;
import net.minecraft.world.level.levelgen.GenerationStep.Decoration;
import net.minecraft.world.level.levelgen.NoiseGeneratorSettings;
@ -915,8 +915,10 @@ public class BiomeAPI {
*/
public static void setBiome(ChunkAccess chunk, BlockPos pos, Holder<Biome> biome) {
int sectionY = (pos.getY() - chunk.getMinBuildHeight()) >> 4;
PalettedContainer<Holder<Biome>> biomes = chunk.getSection(sectionY).getBiomes();
biomes.set((pos.getX() & 15) >> 2, (pos.getY() & 15) >> 2, (pos.getZ() & 15) >> 2, biome);
PalettedContainerRO<Holder<Biome>> biomes = chunk.getSection(sectionY).getBiomes();
//TODO: 1.19 This will disable cave generation the end, Structure was made RO, so we have to find another way to handle this
//biomes.set((pos.getX() & 15) >> 2, (pos.getY() & 15) >> 2, (pos.getZ() & 15) >> 2, biome);
BCLib.LOGGER.warning("Unable to change Biome at " + pos);
}
/**