Fixed the Lexica Botania Quick Lookup time being dependant on fps, also made it 1 second rather than 1.5.

This commit is contained in:
Vasco Lavos committed 2015-11-03 22:04:41 +00:00
1 parent 6e60d58e47
commit aaf540127f
2 files changed
+16 -8

No files matched your search

@@ -38,16 +38,22 @@ public class ClientTickHandler {
public static int ticksInGame = 0;
public static float partialTicks = 0;
public static float delta = 0;
public static float total = 0;
private void calcDelta() {
float oldTotal = total;
total = ticksInGame + partialTicks;
delta = total - oldTotal;
}
@SubscribeEvent
public void renderTick(RenderTickEvent event) {
if(event.phase == Phase.START) {
float newPartialTicks = event.renderTickTime;
float newTotalTime = ticksInGame + newPartialTicks;
float oldTotalTime = ticksInGame + partialTicks;
delta = Math.abs(newTotalTime - oldTotalTime);
partialTicks = newPartialTicks;
} else TooltipAdditionDisplayHandler.render();
if(event.phase == Phase.START)
partialTicks = event.renderTickTime;
else {
TooltipAdditionDisplayHandler.render();
calcDelta();
}
}
@SubscribeEvent
@@ -100,6 +106,8 @@ public class ClientTickHandler {
ticksWithLexicaOpen--;
}
}
calcDelta();
}
}
@@ -110,7 +110,7 @@ public final class TooltipAdditionDisplayHandler {
int cx = x + 8;
int cy = y + 8;
float r = 12;
float time = 30F;
float time = 20F;
float angles = lexiconLookupTime / time * 360F;
GL11.glDisable(GL11.GL_LIGHTING);