Class Camera
java.lang.Object
net.minecraft.client.Camera
- All Implemented Interfaces:
TrackedWaypoint.Camera
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final EnvironmentAttributeProbestatic final floatprivate final BlockPos.MutableBlockPosprivate final Matrix4fprivate final Matrix4fprivate @Nullable Frustum(package private) booleanprivate Frustumprivate static final floatprivate floatprivate booleanprivate static final intprivate static final intprivate @Nullable Entityprivate floatprivate floatprivate final Vector3fprivate static final Vector3fprivate floatprivate floatprivate floatprivate booleanprivate booleanprivate longprivate final Vector3fprivate static final Vector3fprivate @Nullable Levelprivate intprivate final Minecraftprivate floatprivate final Vector3fprivate Vec3private final Projectionstatic final floatprivate floatprivate final Quaternionfprivate final Vector3fprivate static final Vector3fprivate floatprivate float -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidalignWithEntity(float partialTicks) private floatcalculateFov(float partialTicks) private floatcalculateHudFov(float partialTicks) voidprivate Matrix4fvoidvoid@Nullable Entityentity()voidextractRenderState(CameraRenderState cameraState, float partialTicks) @Nullable FrustumfloatgetFov()private floatgetMaxZoom(float cameraDist) getNearPlane(float fov) floatgetRoll()booleanbooleanbooleanvoidprivate floatmodifyFovBasedOnDeathOrFluid(float partialTicks, float fov) Deprecated.private floatmodifyFovBasedOnDeathOrFluid(float partialTicks, float fov, boolean useFovSetting) protected voidmove(float forwards, float up, float right) position()private voidprepareCullFrustum(Matrix4f modelViewMatrix, Matrix4f projectionMatrixForCulling, Vec3 cameraPos) voidreset()rotation()voidvoidsetLevel(@Nullable ClientLevel level) protected voidsetPosition(double x, double y, double z) Sets the position and blockpos of the active renderprotected voidsetPosition(Vec3 position) protected voidsetRotation(float yRot, float xRot) Deprecated.Neo: callsetRotation(float, float, float)insteadprotected voidsetRotation(float yRot, float xRot, float roll) private voidsetupOrtho(float zNear, float zFar, float width, float height, boolean invertY) private voidsetupPerspective(float zNear, float zFar, float fov, float width, float height) voidtick()private voidtickFov()voidupdate(DeltaTracker deltaTracker) upVector()floatxRot()floatyaw()floatyRot()
-
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
-
UP
-
LEFT
-
BASE_HUD_FOV
public static final float BASE_HUD_FOV- See Also:
-
initialized
private boolean initialized -
level
-
entity
-
position
-
blockPosition
-
forwards
-
panoramicForwards
-
up
-
left
-
xRot
private float xRot -
yRot
private float yRot -
roll
private float roll -
rotation
-
detached
private boolean detached -
eyeHeight
private float eyeHeight -
eyeHeightOld
private float eyeHeightOld -
projection
-
cullFrustum
-
capturedFrustum
-
captureFrustum
boolean captureFrustum -
cachedViewRotMatrix
-
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
-
minecraft
-
-
Constructor Details
-
Camera
public Camera()
-
-
Method Details
-
tick
public void tick() -
update
-
extractRenderState
-
tickFov
private void tickFov() -
createProjectionMatrixForCulling
-
getCullFrustum
-
prepareCullFrustum
-
getCapturedFrustum
-
captureFrustum
public void captureFrustum() -
killFrustum
public void killFrustum() -
calculateFov
private float calculateFov(float partialTicks) -
calculateHudFov
private float calculateHudFov(float partialTicks) -
modifyFovBasedOnDeathOrFluid
Deprecated.Neo: usemodifyFovBasedOnDeathOrFluid(float, float, boolean)instead -
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.Neo: callsetRotation(float, float, float)instead -
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
-
position
- Specified by:
positionin interfaceTrackedWaypoint.Camera
-
blockPosition
-
xRot
public float xRot() -
yRot
public float yRot() -
yaw
public float yaw()- Specified by:
yawin interfaceTrackedWaypoint.Camera
-
rotation
-
getViewRotationMatrix
-
getViewRotationProjectionMatrix
-
entity
-
setEntity
-
isInitialized
public boolean isInitialized() -
isDetached
public boolean isDetached() -
attributeProbe
-
getNearPlane
-
getFluidInCamera
-
forwardVector
-
panoramicForwards
-
upVector
-
leftVector
-
reset
public void reset() -
setLevel
-
enablePanoramicMode
public void enablePanoramicMode() -
disablePanoramicMode
public void disablePanoramicMode() -
getRoll
public float getRoll() -
getBlockAtCamera
-
modifyFovBasedOnDeathOrFluid(float, float, boolean)instead