Class Camera

java.lang.Object
net.minecraft.client.Camera
All Implemented Interfaces:
TrackedWaypoint.Camera

public class Camera extends Object implements TrackedWaypoint.Camera
  • Field Details

    • PROJECTION_Z_NEAR

      public static final float PROJECTION_Z_NEAR
      See Also:
    • DEFAULT_CAMERA_DISTANCE

      private static final float DEFAULT_CAMERA_DISTANCE
      See Also:
    • FORWARDS

      private static final Vector3f FORWARDS
    • UP

      private static final Vector3f UP
    • LEFT

      private static final Vector3f LEFT
    • BASE_HUD_FOV

      public static final float BASE_HUD_FOV
      See Also:
    • initialized

      private boolean initialized
    • level

      private @Nullable Level level
    • entity

      private @Nullable Entity entity
    • position

      private Vec3 position
    • blockPosition

      private final BlockPos.MutableBlockPos blockPosition
    • forwards

      private final Vector3f forwards
    • panoramicForwards

      private final Vector3f panoramicForwards
    • up

      private final Vector3f up
    • left

      private final Vector3f left
    • xRot

      private float xRot
    • yRot

      private float yRot
    • roll

      private float roll
    • rotation

      private final Quaternionf rotation
    • detached

      private boolean detached
    • eyeHeight

      private float eyeHeight
    • eyeHeightOld

      private float eyeHeightOld
    • projection

      private final Projection projection
    • cullFrustum

      private Frustum cullFrustum
    • capturedFrustum

      private @Nullable Frustum capturedFrustum
    • captureFrustum

      boolean captureFrustum
    • cachedViewRotMatrix

      private final Matrix4f cachedViewRotMatrix
    • cachedViewRotProjMatrix

      private final Matrix4f cachedViewRotProjMatrix
    • lastProjectionVersion

      private long lastProjectionVersion
    • matrixPropertiesDirty

      private int matrixPropertiesDirty
    • DIRTY_VIEW_ROT

      private static final int DIRTY_VIEW_ROT
      See Also:
    • DIRTY_VIEW_ROT_PROJ

      private static final int DIRTY_VIEW_ROT_PROJ
      See Also:
    • fovModifier

      private float fovModifier
    • oldFovModifier

      private float oldFovModifier
    • fov

      private float fov
    • hudFov

      private float hudFov
    • depthFar

      private float depthFar
    • isPanoramicMode

      private boolean isPanoramicMode
    • attributeProbe

      private final EnvironmentAttributeProbe attributeProbe
    • minecraft

      private final Minecraft minecraft
  • Constructor Details

    • Camera

      public Camera()
  • Method Details

    • tick

      public void tick()
    • update

      public void update(DeltaTracker deltaTracker)
    • extractRenderState

      public void extractRenderState(CameraRenderState cameraState, float partialTicks)
    • tickFov

      private void tickFov()
    • createProjectionMatrixForCulling

      private Matrix4f createProjectionMatrixForCulling()
    • getCullFrustum

      public Frustum getCullFrustum()
    • prepareCullFrustum

      private void prepareCullFrustum(Matrix4f modelViewMatrix, Matrix4f projectionMatrixForCulling, Vec3 cameraPos)
    • getCapturedFrustum

      public @Nullable Frustum getCapturedFrustum()
    • captureFrustum

      public void captureFrustum()
    • killFrustum

      public void killFrustum()
    • calculateFov

      private float calculateFov(float partialTicks)
    • calculateHudFov

      private float calculateHudFov(float partialTicks)
    • modifyFovBasedOnDeathOrFluid

      @Deprecated private float modifyFovBasedOnDeathOrFluid(float partialTicks, float fov)
    • modifyFovBasedOnDeathOrFluid

      private float modifyFovBasedOnDeathOrFluid(float partialTicks, float fov, boolean useFovSetting)
    • alignWithEntity

      private void alignWithEntity(float partialTicks)
    • getMaxZoom

      private float getMaxZoom(float cameraDist)
    • isPanoramicMode

      public boolean isPanoramicMode()
    • getFov

      public float getFov()
    • setupPerspective

      private void setupPerspective(float zNear, float zFar, float fov, float width, float height)
    • setupOrtho

      private void setupOrtho(float zNear, float zFar, float width, float height, boolean invertY)
    • move

      protected void move(float forwards, float up, float right)
    • setRotation

      @Deprecated protected void setRotation(float yRot, float xRot)
      Deprecated.
    • setRotation

      protected void setRotation(float yRot, float xRot, float roll)
    • setPosition

      protected void setPosition(double x, double y, double z)
      Sets the position and blockpos of the active render
    • setPosition

      protected void setPosition(Vec3 position)
    • position

      public Vec3 position()
      Specified by:
      position in interface TrackedWaypoint.Camera
    • blockPosition

      public BlockPos blockPosition()
    • xRot

      public float xRot()
    • yRot

      public float yRot()
    • yaw

      public float yaw()
      Specified by:
      yaw in interface TrackedWaypoint.Camera
    • rotation

      public Quaternionf rotation()
    • getViewRotationMatrix

      public Matrix4f getViewRotationMatrix(Matrix4f dest)
    • getViewRotationProjectionMatrix

      public Matrix4f getViewRotationProjectionMatrix(Matrix4f dest)
    • entity

      public @Nullable Entity entity()
    • setEntity

      public void setEntity(Entity entity)
    • isInitialized

      public boolean isInitialized()
    • isDetached

      public boolean isDetached()
    • attributeProbe

      public EnvironmentAttributeProbe attributeProbe()
    • getNearPlane

      public Camera.NearPlane getNearPlane(float fov)
    • getFluidInCamera

      public FogType getFluidInCamera()
    • forwardVector

      public Vector3fc forwardVector()
    • panoramicForwards

      public Vector3fc panoramicForwards()
    • upVector

      public Vector3fc upVector()
    • leftVector

      public Vector3fc leftVector()
    • reset

      public void reset()
    • setLevel

      public void setLevel(@Nullable ClientLevel level)
    • enablePanoramicMode

      public void enablePanoramicMode()
    • disablePanoramicMode

      public void disablePanoramicMode()
    • getRoll

      public float getRoll()
    • getBlockAtCamera

      public BlockState getBlockAtCamera()