Class EntityVisibilityTester

java.lang.Object
dev.engine_room.flywheel.lib.visual.EntityVisibilityTester

public class EntityVisibilityTester extends Object
A helper class for testing whether an Entity is visible.

The last visible AABB is also checked to prevent the Entity from freezing when it goes offscreen.

  • Constructor Summary

    Constructors
    Constructor
    Description
    EntityVisibilityTester(net.minecraft.world.entity.Entity entity, net.minecraft.core.Vec3i renderOrigin, float scale)
    Create a new EntityVisibilityTester.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    check(org.joml.FrustumIntersection frustum)
    Check whether the Entity is visible.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EntityVisibilityTester

      public EntityVisibilityTester(net.minecraft.world.entity.Entity entity, net.minecraft.core.Vec3i renderOrigin, float scale)
      Create a new EntityVisibilityTester.
      Parameters:
      entity - The Entity to test.
      renderOrigin - The render origin according to the VisualizationContext.
      scale - Multiplier for the Entity's size, can be used to adjust for when an entity's model is larger than its hitbox.
  • Method Details

    • check

      public boolean check(org.joml.FrustumIntersection frustum)
      Check whether the Entity is visible.
      Parameters:
      frustum - The frustum to test against.
      Returns:
      true if the Entity is visible, false otherwise.