Update core
This commit is contained in:
@@ -23,12 +23,12 @@ import com.seibel.lod.core.wrapperInterfaces.minecraft.IMinecraftWrapper;
|
||||
*/
|
||||
public class DependencySetup {
|
||||
public static void createInitialBindings() {
|
||||
SingletonHandler.bind(IVersionConstants.class, VersionConstants.INSTANCE);
|
||||
if (!LodCommonMain.serverSided) {
|
||||
SingletonHandler.bind(IMinecraftWrapper.class, MinecraftWrapper.INSTANCE);
|
||||
SingletonHandler.bind(IMinecraftRenderWrapper.class, MinecraftRenderWrapper.INSTANCE);
|
||||
SingletonHandler.bind(IReflectionHandler.class, ReflectionHandler.createSingleton(MinecraftWrapper.INSTANCE.getOptions().getClass().getDeclaredFields(), MinecraftWrapper.INSTANCE.getOptions()));
|
||||
}
|
||||
SingletonHandler.bind(IVersionConstants.class, VersionConstants.INSTANCE);
|
||||
|
||||
SingletonHandler.bind(IWrapperFactory.class, WrapperFactory.INSTANCE);
|
||||
DependencySetupDoneCheck.isDone = true;
|
||||
|
||||
@@ -28,22 +28,7 @@ public class VersionConstants implements IVersionConstants
|
||||
@Override
|
||||
public boolean isWorldGeneratorSingleThreaded(DistanceGenerationMode distanceGenerationMode)
|
||||
{
|
||||
// We are always asking the server to generate the chunk,
|
||||
// so no use running this stuff multithreaded.
|
||||
return true;
|
||||
/*
|
||||
switch (distanceGenerationMode) {
|
||||
default:
|
||||
case NONE:
|
||||
case BIOME_ONLY:
|
||||
case BIOME_ONLY_SIMULATE_HEIGHT:
|
||||
case SURFACE:
|
||||
case FEATURES:
|
||||
return false;
|
||||
|
||||
case FULL:
|
||||
return true;
|
||||
}*/
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -58,4 +43,11 @@ public class VersionConstants implements IVersionConstants
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isVanillaRenderedChunkSquare()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
-28
@@ -190,34 +190,6 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper
|
||||
}
|
||||
return getMaximumRenderedChunks();
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashSet<AbstractChunkPosWrapper> getMaximumRenderedChunks()
|
||||
{
|
||||
//TODO: Make this a circle
|
||||
IMinecraftWrapper mcWrapper = SingletonHandler.get(IMinecraftWrapper.class);
|
||||
IWrapperFactory factory = SingletonHandler.get(IWrapperFactory.class);
|
||||
|
||||
int chunkRenderDist = this.getRenderDistance();
|
||||
|
||||
AbstractChunkPosWrapper centerChunkPos = mcWrapper.getPlayerChunkPos();
|
||||
int startChunkX = centerChunkPos.getX() - chunkRenderDist;
|
||||
int startChunkZ = centerChunkPos.getZ() - chunkRenderDist;
|
||||
|
||||
// add every position within render distance
|
||||
HashSet<AbstractChunkPosWrapper> renderedPos = new HashSet<AbstractChunkPosWrapper>();
|
||||
for (int chunkX = 0; chunkX < (chunkRenderDist * 2+1); chunkX++)
|
||||
{
|
||||
for(int chunkZ = 0; chunkZ < (chunkRenderDist * 2+1); chunkZ++)
|
||||
{
|
||||
renderedPos.add(factory.createChunkPos(startChunkX + chunkX, startChunkZ + chunkZ));
|
||||
}
|
||||
}
|
||||
|
||||
return renderedPos;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int[] getLightmapPixels()
|
||||
|
||||
+1
-1
Submodule core updated: 8d18ba861e...7db3789bc2
Reference in New Issue
Block a user