Class ScreenShakeType
java.lang.Object
foundry.veil.api.screenshake.type.ScreenShakeType
- Direct Known Subclasses:
GlobalScreenShake
Defines the behavior of a screenshake
- Since:
- 4.5.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
ticksRemaining
protected int ticksRemaining
-
-
Constructor Details
-
ScreenShakeType
public ScreenShakeType(net.minecraft.util.RandomSource randomSource, int length)
-
-
Method Details
-
tick
@Internal public void tick() -
isRemoved
public boolean isRemoved() -
remove
public void remove()Immediately remove the screenshake. -
age
public float age()- Returns:
- How long the screenshake has been running for.
-
length
public float length()- Returns:
- The lifetime of the screenshake.
-
getPositionOffset
public org.joml.Vector3f getPositionOffset()- Returns:
- For the current tick, where the screenshake has offset the camera.
-
getStrength
protected abstract float getStrength()The intensity of the screenshake, up to the implementation of theScreenShakeType.
-