mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 02:45:13 +00:00
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:
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);
|
||||
|
||||
Reference in new issue
Block a user