Class ShakeControl
java.lang.Object
net.ixdarklord.coolcatcanvas.api.vfx.ShakeControl
Camera shake from the server (the client side is
CameraShake). A shake is one small packet; players whose
client lacks CoolCatLib are skipped, and each player's own accessibility setting still scales it.
ShakeControl.shake(level, blastPos, 24.0F, 4.0F, 20); // everyone within 24 blocks, strongest at the blast
ShakeControl.shake(player, 1.5F, 12); // this player only
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidshake(net.minecraft.server.level.ServerLevel level, net.minecraft.world.phys.Vec3 origin, float radius, float degrees, int ticks) Shakes the camera of everyone withinradiusof a place: full strength there, nothing at the edge.static voidshake(net.minecraft.server.level.ServerPlayer player, float degrees, int ticks) Shakes one player's camera, wherever they are.
-
Method Details
-
shake
public static void shake(net.minecraft.server.level.ServerLevel level, net.minecraft.world.phys.Vec3 origin, float radius, float degrees, int ticks) Shakes the camera of everyone withinradiusof a place: full strength there, nothing at the edge.- Parameters:
degrees- how far the camera turns at the origin; it dies away overticks
-
shake
public static void shake(net.minecraft.server.level.ServerPlayer player, float degrees, int ticks) Shakes one player's camera, wherever they are.
-