Removed some jank code

This commit is contained in:
coolGi
2022-07-25 23:11:01 +09:30
parent 49769d0aac
commit 85fec37bed
2 changed files with 1 additions and 24 deletions
@@ -50,7 +50,6 @@ public class BatchGenerator implements IChunkGenerator
public AbstractBatchGenerationEnvionmentWrapper generationGroup;
public ILevel targetLodLevel;
public static final int generationGroupSize = 4;
public static int previousThreadCount = Config.Client.Advanced.Threading.getWorldGenerationThreadPoolSize();
private static final Logger LOGGER = DhLoggerBuilder.getLogger(MethodHandles.lookup().lookupClass().getSimpleName());
// private int estimatedSampleNeeded = 128;
@@ -261,7 +260,7 @@ public class BatchGenerator implements IChunkGenerator
@Override
public boolean isBusy() {
return generationGroup.getEventCount() > previousThreadCount*1.5;
return generationGroup.getEventCount() > Math.max(Config.Client.Advanced.Threading.numberOfWorldGenerationThreads.get().intValue(), 1) *1.5;
}
@Override
@@ -689,28 +689,6 @@ public class Config
+ " that shouldn't cause an issue.")
.build();
/** Returns the number of threads that can be used to generate terrain */
public static int getWorldGenerationThreadPoolSize()
{
Object v = numberOfWorldGenerationThreads.get();
double value = (v instanceof Double) ? (double)((Double) v) : (int)((Integer) v);
//double value = numberOfWorldGenerationThreads.get();
if (value < 1.0)
{
return 1;
}
else
{
return (int) value;
}
}
/** Returns how often world generator threads should run as a number between 0.0 and 1.0 */
public static double getWorldGenerationPartialRunTime()
{
return numberOfWorldGenerationThreads.get() > 1 ?
1.0 : numberOfWorldGenerationThreads.get();
}
public static ConfigEntry<Integer> numberOfBufferBuilderThreads = new ConfigEntry.Builder<Integer>()
.setMinDefaultMax(1,