diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/ChunkLoader.java b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/ChunkLoader.java index ec980e355..90c722020 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/ChunkLoader.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/ChunkLoader.java @@ -38,6 +38,7 @@ import java.util.Objects; import net.minecraft.core.Registry; import net.minecraft.core.SectionPos; #if POST_MC_1_19_3 +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.core.registries.Registries; #endif import net.minecraft.nbt.CompoundTag; @@ -279,11 +280,10 @@ public class ChunkLoader LevelChunkTicks fluidTicks = LevelChunkTicks.load(tagLevel.getList(FLUID_TICKS_TAG_18, 10), string -> Registry.FLUID.getOptional(ResourceLocation.tryParse(string)), chunkPos); #else - // FIXME[1.19.3] -// LevelChunkTicks blockTicks = LevelChunkTicks.load(tagLevel.getList(BLOCK_TICKS_TAG_18, 10), -// string -> Registries.BLOCK.cast(ResourceKey.createRegistryKey(ResourceLocation.tryParse(string))), chunkPos); -// LevelChunkTicks fluidTicks = LevelChunkTicks.load(tagLevel.getList(FLUID_TICKS_TAG_18, 10), -// string -> Registries.FLUID.cast(ResourceLocation.tryParse(string)), chunkPos); + LevelChunkTicks blockTicks = LevelChunkTicks.load(tagLevel.getList(BLOCK_TICKS_TAG_18, 10), + (string -> BuiltInRegistries.BLOCK.getOptional(ResourceLocation.tryParse(string))), chunkPos); + LevelChunkTicks fluidTicks = LevelChunkTicks.load(tagLevel.getList(FLUID_TICKS_TAG_18, 10), + string -> BuiltInRegistries.FLUID.getOptional(ResourceLocation.tryParse(string)), chunkPos); #endif #endif @@ -294,11 +294,9 @@ public class ChunkLoader LevelChunk chunk = new LevelChunk((Level) level.getLevel(), chunkPos, chunkBiomeContainer, upgradeData, blockTicks, fluidTicks, inhabitedTime, levelChunkSections, null); #else - // FIXME[1.19.3] -// LevelChunk chunk = new LevelChunk((Level) level, chunkPos, upgradeData, blockTicks, -// fluidTicks, inhabitedTime, levelChunkSections, null, blendingData); - LevelChunk chunk = new LevelChunk((Level) level, chunkPos, upgradeData, new LevelChunkTicks(), - new LevelChunkTicks(), inhabitedTime, levelChunkSections, null, blendingData); + + LevelChunk chunk = new LevelChunk((Level) level, chunkPos, upgradeData, blockTicks, + fluidTicks, inhabitedTime, levelChunkSections, null, blendingData); #endif // Set some states after object creation chunk.setLightCorrect(isLightOn); diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/step/StepStructureStart.java b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/step/StepStructureStart.java index 5ab852a30..3d97bae55 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/step/StepStructureStart.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/step/StepStructureStart.java @@ -83,11 +83,9 @@ public final class StepStructureStart { environment.params.generator.createStructures(environment.params.registry, environment.params.randomState, tParams.structFeat, chunk, environment.params.structures, environment.params.worldSeed); #else - // FIXME[1.19.3] -// environment.params.generator.createStructures(environment.params.registry, -// environment.params.generator.createState( -// environment.params.level.holderLookup(), environment.params.randomState, environment.params.worldSeed), -// tParams.structFeat, chunk, environment.params.structures); + environment.params.generator.createStructures(environment.params.registry, + environment.params.level.getChunkSource().getGeneratorState(), + tParams.structFeat, chunk, environment.params.structures); #endif #if POST_MC_1_18_1 try {