Fix compiling for MC 1.19 and lower

This commit is contained in:
James Seibel
2023-08-18 18:55:27 -05:00
parent 386dc38150
commit 0b67d64ff4
3 changed files with 7 additions and 2 deletions
@@ -72,8 +72,13 @@ import net.minecraft.world.level.levelgen.feature.ConfiguredStructureFeature;
#endif
#endif
#if MC_1_16_5 || MC_1_17_1
import net.minecraft.world.level.material.Fluids;
#endif
import net.minecraft.world.level.material.Fluid;
public class ChunkLoader
{
#if POST_MC_1_19_2
@@ -44,7 +44,7 @@ public class DummyLightEngine extends LevelLightEngine
public void onBlockEmissionIncrease(BlockPos blockPos, int i) { }
@Override
public int runUpdates(int i, boolean bl, boolean bl2) { }
public int runUpdates(int i, boolean bl, boolean bl2) { return 0; }
@Override
public void enableLightSources(ChunkPos chunkPos, boolean bl) { }
@@ -31,7 +31,7 @@ public class MixinChunkMap
@Inject(method = "save", at = @At(value = "INVOKE", target = CHUNK_SERIALIZER_WRITE))
private void onChunkSave(ChunkAccess chunk, CallbackInfoReturnable<Boolean> ci)
{
#if MC_1_16_5
#if MC_1_16_5 || MC_1_17_1
if (chunk.getBiomes() == null)
{
// in 1.16.5 some chunks may be missing their biomes, which cause issues when attempting to save them