no longer using getMinimumWorldHeight() form version constants, added replacement in WorldWrapper.
This commit is contained in:
@@ -35,7 +35,6 @@ import com.seibel.lod.core.util.LodThreadFactory;
|
||||
import com.seibel.lod.core.util.LodUtil;
|
||||
import com.seibel.lod.core.util.SingletonHandler;
|
||||
import com.seibel.lod.core.util.ThreadMapUtil;
|
||||
import com.seibel.lod.core.wrapperInterfaces.IVersionConstants;
|
||||
import com.seibel.lod.core.wrapperInterfaces.block.IBlockColorSingletonWrapper;
|
||||
import com.seibel.lod.core.wrapperInterfaces.block.IBlockColorWrapper;
|
||||
import com.seibel.lod.core.wrapperInterfaces.block.IBlockShapeWrapper;
|
||||
@@ -58,11 +57,10 @@ import com.seibel.lod.core.wrapperInterfaces.world.IWorldWrapper;
|
||||
public class LodBuilder
|
||||
{
|
||||
private static final IMinecraftWrapper MC = SingletonHandler.get(IMinecraftWrapper.class);
|
||||
private static final IBlockColorSingletonWrapper BLOCK_COLOR = SingletonHandler.get(IBlockColorSingletonWrapper.class);
|
||||
private static final IVersionConstants VERSION_CONSTANTS = SingletonHandler.get(IVersionConstants.class);
|
||||
private static final IBlockColorSingletonWrapper BLOCK_COLOR = SingletonHandler.get(IBlockColorSingletonWrapper.class);
|
||||
|
||||
|
||||
public static final short MIN_WORLD_HEIGHT = (short)VERSION_CONSTANTS.getMinimumWorldHeight();
|
||||
public static final short MIN_WORLD_HEIGHT = MC.getWrappedClientWorld().getMinHeight();
|
||||
/** Minecraft's max light value */
|
||||
public static final short DEFAULT_MAX_LIGHT = 15;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ package com.seibel.lod.core.objects.lod;
|
||||
import com.seibel.lod.core.dataFormat.*;
|
||||
import com.seibel.lod.core.enums.config.DistanceGenerationMode;
|
||||
import com.seibel.lod.core.util.*;
|
||||
import com.seibel.lod.core.wrapperInterfaces.IVersionConstants;
|
||||
import com.seibel.lod.core.wrapperInterfaces.minecraft.IMinecraftWrapper;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -31,7 +31,7 @@ import com.seibel.lod.core.wrapperInterfaces.IVersionConstants;
|
||||
*/
|
||||
public class VerticalLevelContainer implements LevelContainer
|
||||
{
|
||||
|
||||
private static final IMinecraftWrapper MC = SingletonHandler.get(IMinecraftWrapper.class);
|
||||
public final byte detailLevel;
|
||||
public final int size;
|
||||
public final int verticalSize;
|
||||
@@ -177,8 +177,7 @@ public class VerticalLevelContainer implements LevelContainer
|
||||
size = 1 << (LodUtil.REGION_DETAIL_LEVEL - detailLevel);
|
||||
int x = size * size * tempMaxVerticalData;
|
||||
long[] tempDataContainer = new long[x];
|
||||
final IVersionConstants VERSION_CONSTANTS = SingletonHandler.get(IVersionConstants.class);
|
||||
short minHeight = (short) VERSION_CONSTANTS.getMinimumWorldHeight();
|
||||
short minHeight = MC.getWrappedClientWorld().getMinHeight();
|
||||
|
||||
if (version == 6)
|
||||
{
|
||||
@@ -1070,8 +1069,7 @@ public class VerticalLevelContainer implements LevelContainer
|
||||
long current;
|
||||
boolean allGenerated = true;
|
||||
byte[] tempData = ThreadMapUtil.getSaveContainer(detailLevel);
|
||||
final IVersionConstants VERSION_CONSTANTS = SingletonHandler.get(IVersionConstants.class);
|
||||
short minHeight = (short) VERSION_CONSTANTS.getMinimumWorldHeight();
|
||||
short minHeight = MC.getWrappedClientWorld().getMinHeight();
|
||||
|
||||
tempData[index] = detailLevel;
|
||||
index++;
|
||||
|
||||
@@ -52,6 +52,8 @@ public interface IWorldWrapper
|
||||
|
||||
int getSeaLevel();
|
||||
|
||||
short getMinHeight();
|
||||
|
||||
/** @throws UnsupportedOperationException if the WorldWrapper isn't for a ServerWorld */
|
||||
File getSaveFolder() throws UnsupportedOperationException;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user