Class MinecraftWorld
java.lang.Object
lol.trq.helios.minecraft.MinecraftWorld
World-space helpers for overlays such as ESP boxes and nametags: the render partial tick, the camera position, and
entity positions and boxes interpolated between ticks, relative to the camera (the space Minecraft's world
matrices use). Reached by reflection with SRG names, MCP names as fallback.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]Returns an entity's hitbox interpolated to this frame, relative to the camera.double[]camera(double[] out) Returns the camera position in world coordinates.floatReturns how far the current frame is between the last tick and the next.double[]Returns an entity's position interpolated to this frame, relative to the camera.
-
Constructor Details
-
MinecraftWorld
Resolves everything up front.- Parameters:
loader- the class loader Minecraft's classes load through- Throws:
IllegalStateException- if a class or member cannot be found
-
-
Method Details
-
partialTicks
public float partialTicks()Returns how far the current frame is between the last tick and the next.- Returns:
- the partial tick,
[0, 1)
-
camera
public double[] camera(double[] out) Returns the camera position in world coordinates.- Parameters:
out- receives x, y, z- Returns:
out
-
position
Returns an entity's position interpolated to this frame, relative to the camera.- Parameters:
entity- anet.minecraft.entity.EntitypartialTicks- the partial tick, frompartialTicks()camera- the camera position, fromcamera(double[])out- receives x, y (feet), z- Returns:
out
-
box
Returns an entity's hitbox interpolated to this frame, relative to the camera.- Parameters:
entity- anet.minecraft.entity.EntitypartialTicks- the partial tickcamera- the camera positionout- receives minX, minY, minZ, maxX, maxY, maxZ- Returns:
out
-