diff --git a/src/main/java/micdoodle8/mods/galacticraft/core/client/render/item/ItemModelRocket.java b/src/main/java/micdoodle8/mods/galacticraft/core/client/render/item/ItemModelRocket.java index aeb9d6fa0b..8dfab3ffe8 100644 --- a/src/main/java/micdoodle8/mods/galacticraft/core/client/render/item/ItemModelRocket.java +++ b/src/main/java/micdoodle8/mods/galacticraft/core/client/render/item/ItemModelRocket.java @@ -23,7 +23,7 @@ protected Matrix4f getTransformForPerspective(TransformType cameraTransformType) { if (cameraTransformType == TransformType.GUI) { - Vector3f trans = new Vector3f(-0.12F, 0.0F, -0.12F); + Vector3f trans = new Vector3f(-0.15F, 0.0F, -0.15F); Matrix4f ret = new Matrix4f(); ret.setIdentity(); Matrix4f mul = new Matrix4f(); @@ -47,7 +47,7 @@ protected Matrix4f getTransformForPerspective(TransformType cameraTransformType) mul.setTranslation(trans); ret.mul(mul); mul.setIdentity(); - mul.rotY(ClientUtil.getMilliseconds() / 1000.0F); + mul.rotY(ClientUtil.getClientTimeTotal() / 1000.0F); ret.mul(mul); mul.setIdentity(); trans.scale(-1.0F); diff --git a/src/main/java/micdoodle8/mods/galacticraft/core/util/ClientUtil.java b/src/main/java/micdoodle8/mods/galacticraft/core/util/ClientUtil.java index 865c85c036..e124001df4 100644 --- a/src/main/java/micdoodle8/mods/galacticraft/core/util/ClientUtil.java +++ b/src/main/java/micdoodle8/mods/galacticraft/core/util/ClientUtil.java @@ -44,9 +44,9 @@ @SideOnly(Side.CLIENT) public class ClientUtil { - public static long getMilliseconds() + public static long getClientTimeTotal() { - return (Sys.getTime() * 1000) / Sys.getTimerResolution(); + return (long) (Minecraft.getMinecraft().world.getTotalWorldTime() * 66.666666666666); } public static void addVariant(String modID, String name, String... variants) diff --git a/src/main/java/micdoodle8/mods/galacticraft/planets/asteroids/client/render/item/ItemModelAstroMiner.java b/src/main/java/micdoodle8/mods/galacticraft/planets/asteroids/client/render/item/ItemModelAstroMiner.java index 686330f2b7..203404eea8 100644 --- a/src/main/java/micdoodle8/mods/galacticraft/planets/asteroids/client/render/item/ItemModelAstroMiner.java +++ b/src/main/java/micdoodle8/mods/galacticraft/planets/asteroids/client/render/item/ItemModelAstroMiner.java @@ -41,7 +41,7 @@ protected Matrix4f getTransformForPerspective(TransformType cameraTransformType) mul.setTranslation(trans); ret.mul(mul); mul.setIdentity(); - mul.rotY(ClientUtil.getMilliseconds() / 1000.0F); + mul.rotY(ClientUtil.getClientTimeTotal() / 1000.0F); ret.mul(mul); mul.setIdentity(); trans.scale(-1.0F); diff --git a/src/main/java/micdoodle8/mods/galacticraft/planets/asteroids/client/render/item/ItemModelCargoRocket.java b/src/main/java/micdoodle8/mods/galacticraft/planets/asteroids/client/render/item/ItemModelCargoRocket.java index 72f130a9aa..18fa96928f 100644 --- a/src/main/java/micdoodle8/mods/galacticraft/planets/asteroids/client/render/item/ItemModelCargoRocket.java +++ b/src/main/java/micdoodle8/mods/galacticraft/planets/asteroids/client/render/item/ItemModelCargoRocket.java @@ -23,7 +23,7 @@ protected Matrix4f getTransformForPerspective(TransformType cameraTransformType) { if (cameraTransformType == TransformType.GUI) { - Vector3f trans = new Vector3f(-0.08F, 0.0F, -0.08F); + Vector3f trans = new Vector3f(-0.15F, 0.0F, -0.15F); Matrix4f ret = new Matrix4f(); ret.setIdentity(); Matrix4f mul = new Matrix4f(); @@ -47,7 +47,7 @@ protected Matrix4f getTransformForPerspective(TransformType cameraTransformType) mul.setTranslation(trans); ret.mul(mul); mul.setIdentity(); - mul.rotY(ClientUtil.getMilliseconds() / 1000.0F); + mul.rotY(ClientUtil.getClientTimeTotal() / 1000.0F); ret.mul(mul); mul.setIdentity(); trans.scale(-1.0F); diff --git a/src/main/java/micdoodle8/mods/galacticraft/planets/asteroids/client/render/item/ItemModelRocketT3.java b/src/main/java/micdoodle8/mods/galacticraft/planets/asteroids/client/render/item/ItemModelRocketT3.java index dfcd354dca..6f0488d5ae 100644 --- a/src/main/java/micdoodle8/mods/galacticraft/planets/asteroids/client/render/item/ItemModelRocketT3.java +++ b/src/main/java/micdoodle8/mods/galacticraft/planets/asteroids/client/render/item/ItemModelRocketT3.java @@ -23,7 +23,7 @@ protected Matrix4f getTransformForPerspective(TransformType cameraTransformType) { if (cameraTransformType == TransformType.GUI) { - Vector3f trans = new Vector3f(-0.12F, 0.0F, -0.12F); + Vector3f trans = new Vector3f(-0.15F, 0.0F, -0.15F); Matrix4f ret = new Matrix4f(); ret.setIdentity(); Matrix4f mul = new Matrix4f(); @@ -47,7 +47,7 @@ protected Matrix4f getTransformForPerspective(TransformType cameraTransformType) mul.setTranslation(trans); ret.mul(mul); mul.setIdentity(); - mul.rotY(ClientUtil.getMilliseconds() / 1000.0F); + mul.rotY(ClientUtil.getClientTimeTotal() / 1000.0F); ret.mul(mul); mul.setIdentity(); trans.scale(-1.0F); diff --git a/src/main/java/micdoodle8/mods/galacticraft/planets/asteroids/event/AsteroidsEventHandlerClient.java b/src/main/java/micdoodle8/mods/galacticraft/planets/asteroids/event/AsteroidsEventHandlerClient.java index c287715d4f..558e0b00a0 100644 --- a/src/main/java/micdoodle8/mods/galacticraft/planets/asteroids/event/AsteroidsEventHandlerClient.java +++ b/src/main/java/micdoodle8/mods/galacticraft/planets/asteroids/event/AsteroidsEventHandlerClient.java @@ -139,7 +139,7 @@ public void onBodyRender(CelestialBodyRenderEvent.Pre renderEvent) { if (renderEvent.celestialBody.equals(AsteroidsModule.planetAsteroids)) { - GL11.glRotatef(ClientUtil.getMilliseconds() / 10.0F % 360, 0, 0, 1); + GL11.glRotatef(ClientUtil.getClientTimeTotal() / 10.0F % 360, 0, 0, 1); } } diff --git a/src/main/java/micdoodle8/mods/galacticraft/planets/mars/client/render/item/ItemModelRocketT2.java b/src/main/java/micdoodle8/mods/galacticraft/planets/mars/client/render/item/ItemModelRocketT2.java index 1886d59fb8..acf44f18a1 100644 --- a/src/main/java/micdoodle8/mods/galacticraft/planets/mars/client/render/item/ItemModelRocketT2.java +++ b/src/main/java/micdoodle8/mods/galacticraft/planets/mars/client/render/item/ItemModelRocketT2.java @@ -1,13 +1,12 @@ package micdoodle8.mods.galacticraft.planets.mars.client.render.item; import micdoodle8.mods.galacticraft.core.Constants; +import micdoodle8.mods.galacticraft.core.util.ClientUtil; import micdoodle8.mods.galacticraft.core.wrappers.ModelTransformWrapper; import net.minecraft.client.renderer.block.model.IBakedModel; import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformType; import net.minecraftforge.common.model.TRSRTransformation; -import org.lwjgl.Sys; - import javax.vecmath.Matrix4f; import javax.vecmath.Quat4f; import javax.vecmath.Vector3f; @@ -24,7 +23,7 @@ protected Matrix4f getTransformForPerspective(TransformType cameraTransformType) { if (cameraTransformType == TransformType.GUI) { - Vector3f trans = new Vector3f(-0.12F, 0.0F, -0.12F); + Vector3f trans = new Vector3f(-0.15F, 0.0F, -0.15F); Matrix4f ret = new Matrix4f(); ret.setIdentity(); Matrix4f mul = new Matrix4f(); @@ -48,7 +47,7 @@ protected Matrix4f getTransformForPerspective(TransformType cameraTransformType) mul.setTranslation(trans); ret.mul(mul); mul.setIdentity(); - mul.rotY(Sys.getTime() / 1000.0F); + mul.rotY(ClientUtil.getClientTimeTotal() / 1000.0F); ret.mul(mul); mul.setIdentity(); trans.scale(-1.0F);