@@ -29,6 +29,7 @@ import net.minecraft.world.level.chunk.ChunkStatus;
|
||||
import net.minecraft.world.level.chunk.DataPaletteBlock;
|
||||
import net.minecraft.world.level.chunk.IChunkAccess;
|
||||
import net.minecraft.world.level.chunk.NibbleArray;
|
||||
import net.minecraft.world.level.chunk.PalettedContainerRO;
|
||||
import net.minecraft.world.level.chunk.storage.ChunkRegionLoader;
|
||||
import net.minecraft.world.level.chunk.storage.EntityStorage;
|
||||
import net.minecraft.world.level.entity.PersistentEntitySectionManager;
|
||||
@@ -52,7 +53,7 @@ public class CraftChunk implements Chunk {
|
||||
private final WorldServer worldServer;
|
||||
private final int x;
|
||||
private final int z;
|
||||
private static final DataPaletteBlock<IBlockData> emptyBlockIDs = new DataPaletteBlock<>(net.minecraft.world.level.block.Block.BLOCK_STATE_REGISTRY, Blocks.AIR.defaultBlockState(), DataPaletteBlock.e.SECTION_STATES);
|
||||
private static final DataPaletteBlock<IBlockData> emptyBlockIDs = new DataPaletteBlock<>(net.minecraft.world.level.block.Block.BLOCK_STATE_REGISTRY, Blocks.AIR.defaultBlockState(), DataPaletteBlock.d.SECTION_STATES);
|
||||
private static final byte[] emptyLight = new byte[2048];
|
||||
|
||||
public CraftChunk(net.minecraft.world.level.chunk.Chunk chunk) {
|
||||
@@ -293,10 +294,10 @@ public class CraftChunk implements Chunk {
|
||||
byte[][] sectionSkyLights = new byte[cs.length][];
|
||||
byte[][] sectionEmitLights = new byte[cs.length][];
|
||||
boolean[] sectionEmpty = new boolean[cs.length];
|
||||
DataPaletteBlock<Holder<BiomeBase>>[] biome = (includeBiome || includeBiomeTempRain) ? new DataPaletteBlock[cs.length] : null;
|
||||
PalettedContainerRO<Holder<BiomeBase>>[] biome = (includeBiome || includeBiomeTempRain) ? new DataPaletteBlock[cs.length] : null;
|
||||
|
||||
IRegistry<BiomeBase> iregistry = worldServer.registryAccess().registryOrThrow(IRegistry.BIOME_REGISTRY);
|
||||
Codec<DataPaletteBlock<Holder<BiomeBase>>> biomeCodec = DataPaletteBlock.codec(iregistry.asHolderIdMap(), iregistry.holderByNameCodec(), DataPaletteBlock.e.SECTION_BIOMES, iregistry.getHolderOrThrow(Biomes.PLAINS));
|
||||
Codec<PalettedContainerRO<Holder<BiomeBase>>> biomeCodec = DataPaletteBlock.codecRO(iregistry.asHolderIdMap(), iregistry.holderByNameCodec(), DataPaletteBlock.d.SECTION_BIOMES, iregistry.getHolderOrThrow(Biomes.PLAINS));
|
||||
|
||||
for (int i = 0; i < cs.length; i++) {
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
@@ -361,7 +362,7 @@ public class CraftChunk implements Chunk {
|
||||
empty[i] = true;
|
||||
|
||||
if (biome != null) {
|
||||
biome[i] = new DataPaletteBlock<>(iregistry.asHolderIdMap(), iregistry.getHolderOrThrow(Biomes.PLAINS), DataPaletteBlock.e.SECTION_BIOMES);
|
||||
biome[i] = new DataPaletteBlock<>(iregistry.asHolderIdMap(), iregistry.getHolderOrThrow(Biomes.PLAINS), DataPaletteBlock.d.SECTION_BIOMES);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user