From 5478012e6ee5ed4d8c317580c644ef0e0894b7f8 Mon Sep 17 00:00:00 2001 From: halotroop2288 Date: Fri, 28 Feb 2020 22:41:59 -0800 Subject: [PATCH] Position Integers --- .../java/com/github/halotroop/litecraft/Litecraft.java | 8 ++------ .../com/github/halotroop/litecraft/logic/Gamemode.java | 3 ++- .../com/github/halotroop/litecraft/screens/IngameHUD.java | 6 ++++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/github/halotroop/litecraft/Litecraft.java b/src/main/java/com/github/halotroop/litecraft/Litecraft.java index a8ea1e4..d0bb6fc 100644 --- a/src/main/java/com/github/halotroop/litecraft/Litecraft.java +++ b/src/main/java/com/github/halotroop/litecraft/Litecraft.java @@ -175,15 +175,11 @@ public class Litecraft extends Game { return this.world; } public LitecraftSave getSave() - { - return save; - } + { return save; } public void changeWorld(World world) { this.world = world; } public void setSave(LitecraftSave save) - { - this.save = save; - } + { this.save = save; } } \ No newline at end of file diff --git a/src/main/java/com/github/halotroop/litecraft/logic/Gamemode.java b/src/main/java/com/github/halotroop/litecraft/logic/Gamemode.java index fe9e813..478622b 100644 --- a/src/main/java/com/github/halotroop/litecraft/logic/Gamemode.java +++ b/src/main/java/com/github/halotroop/litecraft/logic/Gamemode.java @@ -1,5 +1,6 @@ package com.github.halotroop.litecraft.logic; -public enum Gamemode { +public enum Gamemode +{ SURVIVAL,CREATIVE,SPECTATOR,ARR } diff --git a/src/main/java/com/github/halotroop/litecraft/screens/IngameHUD.java b/src/main/java/com/github/halotroop/litecraft/screens/IngameHUD.java index c140dd8..94290b7 100644 --- a/src/main/java/com/github/halotroop/litecraft/screens/IngameHUD.java +++ b/src/main/java/com/github/halotroop/litecraft/screens/IngameHUD.java @@ -32,14 +32,16 @@ public class IngameHUD extends Screen public void tick() { 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 " + GingerRegister.getInstance().game.data.player.getPosition().toString()); + positionText.setText("Position " + (int) position.x() + ", " + (int) position.y() + ", "+ (int) position.z()); } @Override public void close() { - + debugText.remove(); + positionText.remove(); } }