Update to Minecraft 1.19

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2022-06-08 02:00:00 +10:00
parent 91d9aa9a89
commit 25f3b50f6b
332 changed files with 3628 additions and 2559 deletions

View File

@@ -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);
}
}