Make ChunkRenderDispatcher.countRenderBuilders configurable. Closes #2775.

This commit is contained in:
RainWarrior 2016-05-03 10:28:06 +03:00
parent 330812dfa8
commit f3fdf4303a

View file

@ -0,0 +1,19 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/chunk/ChunkRenderDispatcher.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/chunk/ChunkRenderDispatcher.java
@@ -43,9 +43,15 @@
public ChunkRenderDispatcher()
{
+ this(-1);
+ }
+
+ public ChunkRenderDispatcher(int countRenderBuilders)
+ {
int i = Math.max(1, (int)((double)Runtime.getRuntime().maxMemory() * 0.3D) / 10485760);
int j = Math.max(1, MathHelper.func_76125_a(Runtime.getRuntime().availableProcessors(), 1, i / 5));
- this.field_188249_c = MathHelper.func_76125_a(j * 10, 1, i);
+ if(countRenderBuilders < 0) countRenderBuilders = MathHelper.func_76125_a(j * 10, 1, i);
+ this.field_188249_c = countRenderBuilders;
if (j > 1)
{