Class ShakeControl

java.lang.Object
net.ixdarklord.coolcatcanvas.api.vfx.ShakeControl

public final class ShakeControl extends Object
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 Type
    Method
    Description
    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 within radius of a place: full strength there, nothing at the edge.
    static void
    shake(net.minecraft.server.level.ServerPlayer player, float degrees, int ticks)
    Shakes one player's camera, wherever they are.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 within radius of a place: full strength there, nothing at the edge.
      Parameters:
      degrees - how far the camera turns at the origin; it dies away over ticks
    • shake

      public static void shake(net.minecraft.server.level.ServerPlayer player, float degrees, int ticks)
      Shakes one player's camera, wherever they are.