Position Integers

pull/12/head
Caroline Bell 2020-02-28 22:41:59 -08:00
parent 8da1387bbc
commit 5478012e6e
3 changed files with 8 additions and 9 deletions

View File

@ -175,15 +175,11 @@ public class Litecraft extends Game
{ return this.world; } { return this.world; }
public LitecraftSave getSave() public LitecraftSave getSave()
{ { return save; }
return save;
}
public void changeWorld(World world) public void changeWorld(World world)
{ this.world = world; } { this.world = world; }
public void setSave(LitecraftSave save) public void setSave(LitecraftSave save)
{ { this.save = save; }
this.save = save;
}
} }

View File

@ -1,5 +1,6 @@
package com.github.halotroop.litecraft.logic; package com.github.halotroop.litecraft.logic;
public enum Gamemode { public enum Gamemode
{
SURVIVAL,CREATIVE,SPECTATOR,ARR SURVIVAL,CREATIVE,SPECTATOR,ARR
} }

View File

@ -32,14 +32,16 @@ public class IngameHUD extends Screen
public void tick() public void tick()
{ {
Vector4i dbg = litecraft.dbgStats; Vector4i dbg = litecraft.dbgStats;
Vector3f position = GingerRegister.getInstance().game.data.player.getPosition();
debugText.setText("FPS: " + dbg.x() + " UPS: " + dbg.y + " TPS: " + dbg.z); debugText.setText("FPS: " + dbg.x() + " UPS: " + dbg.y + " TPS: " + dbg.z);
positionText.setText("Position " + GingerRegister.getInstance().game.data.player.getPosition().toString()); positionText.setText("Position " + (int) position.x() + ", " + (int) position.y() + ", "+ (int) position.z());
} }
@Override @Override
public void close() public void close()
{ {
debugText.remove();
positionText.remove();
} }
} }