Skip to content

Commit

Permalink
Fixed invalid methods in 1.18.2 when using Spigot (#996)
Browse files Browse the repository at this point in the history
  • Loading branch information
OmerBenGera committed Mar 12, 2022
1 parent 7f99f39 commit ef79f9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Expand Up @@ -200,8 +200,8 @@ public void setBiome(List<ChunkPosition> chunkPositions, Biome biome, Collection
playerConnection.sendPacket(mapChunkPacket);
});
}, unloadedChunkCompound -> {
Codec<DataPaletteBlock<Holder<BiomeBase>>> codec = DataPaletteBlock.codec(biomesRegistryHolder,
biomesRegistry.p(), DataPaletteBlock.e.e, biomesRegistry.g(Biomes.b), null);
Codec<DataPaletteBlock<Holder<BiomeBase>>> codec = DataPaletteBlock.a(biomesRegistryHolder,
biomesRegistry.p(), DataPaletteBlock.e.e, biomesRegistry.g(Biomes.b));
DataResult<NBTBase> dataResult = codec.encodeStart(DynamicOpsNBT.a,
new DataPaletteBlock<>(biomesRegistryHolder, biomeBase, DataPaletteBlock.e.e));
NBTBase biomesCompound = dataResult.getOrThrow(false, error -> {
Expand Down Expand Up @@ -278,8 +278,8 @@ public void deleteChunks(Island island, List<ChunkPosition> chunkPositions, Runn

IRegistry<BiomeBase> biomesRegistry = worldServer.getBiomeRegistry();
Registry<Holder<BiomeBase>> biomesRegistryHolder = worldServer.getBiomeRegistryHolder();
Codec<DataPaletteBlock<Holder<BiomeBase>>> biomesCodec = DataPaletteBlock.codec(biomesRegistryHolder,
biomesRegistry.p(), DataPaletteBlock.e.e, biomesRegistry.g(Biomes.b), null);
Codec<DataPaletteBlock<Holder<BiomeBase>>> biomesCodec = DataPaletteBlock.a(biomesRegistryHolder,
biomesRegistry.p(), DataPaletteBlock.e.e, biomesRegistry.g(Biomes.b));

LightEngine lightEngine = worldServer.getLightEngine();
net.minecraft.world.level.chunk.ChunkSection[] chunkSections = protoChunk.getSections();
Expand Down Expand Up @@ -347,8 +347,8 @@ public CompletableFuture<List<CalculatedChunk>> calculateChunks(List<ChunkPositi

Codec<DataPaletteBlock<IBlockData>> blocksCodec = DataPaletteBlock.a(Block.CODEC, IBlockData.b,
DataPaletteBlock.e.d, Blocks.a.n());
Codec<DataPaletteBlock<Holder<BiomeBase>>> biomesCodec = DataPaletteBlock.codec(biomesRegistryHolder,
biomesRegistry.p(), DataPaletteBlock.e.e, biomesRegistry.g(Biomes.b), null);
Codec<DataPaletteBlock<Holder<BiomeBase>>> biomesCodec = DataPaletteBlock.a(biomesRegistryHolder,
biomesRegistry.p(), DataPaletteBlock.e.e, biomesRegistry.g(Biomes.b));

net.minecraft.world.level.chunk.ChunkSection[] chunkSections =
new net.minecraft.world.level.chunk.ChunkSection[worldServer.getSectionsAmount()];
Expand Down Expand Up @@ -380,7 +380,7 @@ public CompletableFuture<List<CalculatedChunk>> calculateChunks(List<ChunkPositi
});
} else {
biomesDataPalette = new DataPaletteBlock<>(biomesRegistryHolder, biomesRegistry.g(Biomes.b),
DataPaletteBlock.e.e, null);
DataPaletteBlock.e.e);
}

chunkSections[sectionIndex] = new net.minecraft.world.level.chunk.ChunkSection(
Expand Down
Expand Up @@ -193,7 +193,7 @@ private void setBiome(ChunkAccess chunk, Biome biome) {
if (currentSection != null) {
DataPaletteBlock<IBlockData> dataPaletteBlock = currentSection.getBlocks();
DataPaletteBlock<Holder<BiomeBase>> biomesDataPalette = new DataPaletteBlock<>(biomesRegistryHolder,
biomeBase, DataPaletteBlock.e.e, null);
biomeBase, DataPaletteBlock.e.e);
chunkSections[i] = new net.minecraft.world.level.chunk.ChunkSection(
currentSection.getYPosition() >> 4, dataPaletteBlock, biomesDataPalette);
}
Expand Down

0 comments on commit ef79f9e

Please sign in to comment.