Run game in new thread, make LevelRenderer better
This commit is contained in:
parent
9a93969fc7
commit
704309f949
|
@ -13,6 +13,8 @@ public final class GameSettings
|
|||
settingCount = 9;
|
||||
|
||||
this.minecraft = minecraft;
|
||||
|
||||
Minecraft.minecraft = minecraft;
|
||||
|
||||
load();
|
||||
}
|
||||
|
|
|
@ -75,6 +75,7 @@ public final class Minecraft implements Runnable {
|
|||
private int lastClick;
|
||||
public boolean raining;
|
||||
private static Tessellator tessellator = Tessellator.instance;
|
||||
public static Minecraft minecraft;
|
||||
public Entity field_22009_h;
|
||||
|
||||
|
||||
|
@ -982,9 +983,9 @@ public final class Minecraft implements Runnable {
|
|||
}
|
||||
|
||||
private void tick() {
|
||||
if(!settings.gamemode) {
|
||||
this.gamemode.spawnMob();
|
||||
}
|
||||
//if(!settings.gamemode) {
|
||||
//this.gamemode.spawnMob();
|
||||
//}
|
||||
HUDScreen var17 = this.hud;
|
||||
++this.hud.ticks;
|
||||
|
||||
|
@ -1283,4 +1284,8 @@ public final class Minecraft implements Runnable {
|
|||
|
||||
System.gc();
|
||||
}
|
||||
|
||||
public static Minecraft getMinecraft() {
|
||||
return minecraft;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.mojang.minecraft.render;
|
||||
|
||||
import com.mojang.minecraft.Minecraft;
|
||||
import com.mojang.minecraft.level.Level;
|
||||
import com.mojang.minecraft.level.tile.Block;
|
||||
import com.mojang.minecraft.player.Player;
|
||||
|
|
|
@ -17,7 +17,7 @@ public final class LevelRenderer {
|
|||
|
||||
public Level level;
|
||||
public int listId;
|
||||
public IntBuffer buffer = GLAllocation.createDirectIntBuffer(4096);
|
||||
public IntBuffer buffer = GLAllocation.createDirectIntBuffer(65536);
|
||||
public List<Chunk> chunks = new ArrayList<Chunk>();
|
||||
private Chunk[] loadQueue;
|
||||
public Chunk[] chunkCache;
|
||||
|
@ -26,7 +26,7 @@ public final class LevelRenderer {
|
|||
private int zChunks;
|
||||
private int baseListId;
|
||||
public Minecraft minecraft;
|
||||
private int[] chunkDataCache = new int['\uc350'];
|
||||
private int[] chunkDataCache = new int[4096];
|
||||
public int ticks = 0;
|
||||
private float lastLoadX = -9999.0F;
|
||||
private float lastLoadY = -9999.0F;
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user