Add RenderWrapper.getPartialTickTime()

This commit is contained in:
James Seibel
2026-02-02 07:09:06 -06:00
parent bbf69c7911
commit b511ab4fb3
2 changed files with 18 additions and 0 deletions
@@ -2,6 +2,7 @@ package com.seibel.distanthorizons.core.api.internal.rendering;
import com.seibel.distanthorizons.core.api.internal.ClientApi;
import com.seibel.distanthorizons.core.util.math.Mat4f;
import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftRenderWrapper;
import com.seibel.distanthorizons.core.wrapperInterfaces.world.IClientLevelWrapper;
/**
@@ -24,6 +25,7 @@ public class DhRenderState
* IE 60 FPS = 16.6 MS <br>
*
* @link https://fpstoms.com/
* @see IMinecraftRenderWrapper#getPartialTickTime()
*/
public float partialTickTime = -1;
public IClientLevelWrapper clientLevelWrapper = null;
@@ -21,6 +21,7 @@ package com.seibel.distanthorizons.core.wrapperInterfaces.minecraft;
import java.awt.Color;
import com.seibel.distanthorizons.core.api.internal.rendering.DhRenderState;
import com.seibel.distanthorizons.core.enums.EDhDirection;
import com.seibel.distanthorizons.core.wrapperInterfaces.misc.ILightMapWrapper;
import com.seibel.distanthorizons.coreapi.interfaces.dependencyInjection.IBindable;
@@ -43,6 +44,21 @@ public interface IMinecraftRenderWrapper extends IBindable
boolean playerHasBlindingEffect();
/**
* percentage of time into the current client tick. <br><br>
*
* Can be converted to a millisecond frametime
* (IE time between frames in milliseconds) using the formula: <br>
* <code>
* (partialTickTime/20*1000)
* </code> <br>
* IE 60 FPS = 16.6 MS <br>
*
* @link https://fpstoms.com/
* @see DhRenderState#partialTickTime
*/
float getPartialTickTime();
Vec3d getCameraExactPosition();
Color getFogColor(float partialTicks);