fix really bad bug and add memory counter
parent
e285e752b0
commit
b82f24b4ad
|
@ -31,10 +31,14 @@ public class IngameHUD extends Screen
|
|||
@Override
|
||||
public void tick()
|
||||
{
|
||||
// long maxMemory = Runtime.getRuntime().maxMemory();
|
||||
long totalMemory = Runtime.getRuntime().totalMemory();
|
||||
long freeMemory = Runtime.getRuntime().freeMemory();
|
||||
long usedMemory = totalMemory - freeMemory;
|
||||
Vector4i dbg = litecraft.dbgStats;
|
||||
Vector3f position = GingerRegister.getInstance().game.data.player.getPosition();
|
||||
debugText.setText("FPS: " + dbg.x() + " UPS: " + dbg.y + " TPS: " + dbg.z);
|
||||
positionText.setText("Position " + (int) position.x() + ", " + (int) position.y() + ", "+ (int) position.z());
|
||||
debugText.setText("FPS: " + dbg.x() + " UPS: " + dbg.y + " TPS: " + dbg.z + " Mem: " + (usedMemory / 1024 / 1024) + "MB / " + (totalMemory / 1024 / 1024) + " MB");
|
||||
positionText.setText("Position " + (int) position.x() + ", " + (int) position.y() + ", "+ (int) position.z() );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -197,7 +197,7 @@ public class World implements BlockAccess, WorldGenConstants
|
|||
this.save.saveChunk(chunk); // save chunk
|
||||
});
|
||||
chunkPositions.forEach((LongConsumer) (pos -> this.chunks.remove(pos))); // remove all chunks
|
||||
});
|
||||
}).join();
|
||||
}
|
||||
|
||||
public long getSeed()
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.github.halotroop.litecraft.world.dimension;
|
||||
|
||||
import com.github.halotroop.litecraft.world.gen.*;
|
||||
import com.github.halotroop.litecraft.world.gen.modifier.CavesModifier;
|
||||
|
||||
public final class Dimensions
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue