Class ClientWindManager

java.lang.Object
net.frozenblock.lib.wind.api.ClientWindManager

@Environment(CLIENT) public final class ClientWindManager extends Object
Handles wind on the client side.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static net.minecraft.world.phys.Vec3
     
     
    static boolean
     
    static double
     
    static double
     
    static double
     
    static net.minecraft.world.level.levelgen.synth.ImprovedNoise
     
    static boolean
     
    static double
     
    static double
     
    static double
     
    static double
     
    static double
     
    static double
     
    static long
     
    static double
     
    static double
     
    static double
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    static void
    static void
    addWindDisturbance(@NotNull WindDisturbance<?> windDisturbance)
     
    static void
     
    static void
     
    static void
     
    static @NotNull net.minecraft.world.phys.Vec3
    getRawDisturbanceMovement(@NotNull net.minecraft.world.level.Level level, @NotNull net.minecraft.world.phys.Vec3 pos)
    Returns only the wind disturbance at the specified Vec3.
     
     
    static @NotNull net.minecraft.world.phys.Vec3
    getWindMovement(@NotNull net.minecraft.world.level.Level level, @NotNull net.minecraft.core.BlockPos pos)
    Returns the wind movement at the bottom center of a specified BlockPos.
    static @NotNull net.minecraft.world.phys.Vec3
    getWindMovement(@NotNull net.minecraft.world.level.Level level, @NotNull net.minecraft.core.BlockPos pos, double scale)
    Returns the wind movement at the bottom center of a specified BlockPos, multiplied.
    static @NotNull net.minecraft.world.phys.Vec3
    getWindMovement(@NotNull net.minecraft.world.level.Level level, @NotNull net.minecraft.core.BlockPos pos, double scale, double clamp)
    Returns the wind movement at the bottom center of a specified BlockPos, multiplied and clamped.
    static @NotNull net.minecraft.world.phys.Vec3
    getWindMovement(@NotNull net.minecraft.world.level.Level level, @NotNull net.minecraft.world.phys.Vec3 pos)
    Returns the wind movement at the center of a specified Vec3.
    static @NotNull net.minecraft.world.phys.Vec3
    getWindMovement(@NotNull net.minecraft.world.level.Level level, @NotNull net.minecraft.world.phys.Vec3 pos, double scale)
    Returns the wind movement at a specified Vec3, multiplied.
    static @NotNull net.minecraft.world.phys.Vec3
    getWindMovement(@NotNull net.minecraft.world.level.Level level, @NotNull net.minecraft.world.phys.Vec3 pos, double scale, double clamp)
    Returns the wind movement at a specified Vec3, multiplied and clamped.
    static @NotNull net.minecraft.world.phys.Vec3
    getWindMovement(@NotNull net.minecraft.world.level.Level level, @NotNull net.minecraft.world.phys.Vec3 pos, double scale, double clamp, double windDisturbanceScale)
    Returns the wind movement at a specified Vec3, multiplied, clamped, and with a separately multiplied wind disturbance value.
    static @NotNull net.minecraft.world.phys.Vec3
    getWindMovement3D(@NotNull net.minecraft.core.BlockPos pos, double stretch)
    Deprecated.
    static @NotNull net.minecraft.world.phys.Vec3
    getWindMovement3D(@NotNull net.minecraft.core.BlockPos pos, double scale, double stretch)
    Deprecated.
    static @NotNull net.minecraft.world.phys.Vec3
    getWindMovement3D(@NotNull net.minecraft.core.BlockPos pos, double scale, double clamp, double stretch)
    Deprecated.
    static @NotNull net.minecraft.world.phys.Vec3
    getWindMovement3D(@NotNull net.minecraft.world.phys.Vec3 pos, double stretch)
    Deprecated.
    static @NotNull net.minecraft.world.phys.Vec3
    getWindMovement3D(@NotNull net.minecraft.world.phys.Vec3 pos, double scale, double stretch)
    Deprecated.
    static @NotNull net.minecraft.world.phys.Vec3
    getWindMovement3D(@NotNull net.minecraft.world.phys.Vec3 pos, double scale, double clamp, double stretch)
    Deprecated.
    static double
    getWindX(float partialTick)
     
    static double
    getWindY(float partialTick)
     
    static double
    getWindZ(float partialTick)
     
    static @NotNull net.minecraft.world.phys.Vec3
    sample3D(@NotNull net.minecraft.world.phys.Vec3 pos, double stretch)
    Deprecated.
    static @NotNull net.minecraft.world.phys.Vec3
    sampleVec3(@NotNull net.minecraft.world.level.levelgen.synth.ImprovedNoise sampler, double x, double y, double z)
     
    static void
    setSeed(long seed)
     
    static boolean
     
    static void
    tick(@NotNull net.minecraft.client.multiplayer.ClientLevel level)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • EXTENSIONS

      public static final List<ClientWindManagerExtension> EXTENSIONS
    • time

      public static long time
    • overrideWind

      public static boolean overrideWind
    • commandWind

      public static net.minecraft.world.phys.Vec3 commandWind
    • prevWindX

      public static double prevWindX
    • prevWindY

      public static double prevWindY
    • prevWindZ

      public static double prevWindZ
    • windX

      public static double windX
    • windY

      public static double windY
    • windZ

      public static double windZ
    • prevLaggedWindX

      public static double prevLaggedWindX
    • prevLaggedWindY

      public static double prevLaggedWindY
    • prevLaggedWindZ

      public static double prevLaggedWindZ
    • laggedWindX

      public static double laggedWindX
    • laggedWindY

      public static double laggedWindY
    • laggedWindZ

      public static double laggedWindZ
    • hasInitialized

      public static boolean hasInitialized
    • noise

      public static net.minecraft.world.level.levelgen.synth.ImprovedNoise noise
  • Constructor Details

    • ClientWindManager

      public ClientWindManager()
  • Method Details

    • getWindDisturbances

      public static List<WindDisturbance<?>> getWindDisturbances()
    • getWindDisturbanceStash

      public static List<WindDisturbance<?>> getWindDisturbanceStash()
    • clearWindDisturbances

      public static void clearWindDisturbances()
    • clearAllWindDisturbances

      public static void clearAllWindDisturbances()
    • clearAndSwitchWindDisturbances

      public static void clearAndSwitchWindDisturbances()
    • addWindDisturbance

      public static void addWindDisturbance(@NotNull @NotNull WindDisturbance<?> windDisturbance)
    • addExtension

      public static void addExtension(@Nullable @Nullable Supplier<ClientWindManagerExtension> extension)
      Parameters:
      extension - the ClientWindManagerExtension to add.
    • addExtension

      public static void addExtension(@Nullable @Nullable ClientWindManagerExtension extension)
      Parameters:
      extension - the ClientWindManagerExtension to add.
    • setSeed

      public static void setSeed(long seed)
    • getWindX

      public static double getWindX(float partialTick)
      Returns:
      the current global wind's lerped X value.
    • getWindY

      public static double getWindY(float partialTick)
      Returns:
      the current global wind's lerped Y value.
    • getWindZ

      public static double getWindZ(float partialTick)
      Returns:
      the current global wind's lerped Z value.
    • shouldUseWind

      public static boolean shouldUseWind()
      Returns:
      whether wind is currently enabled.
    • tick

      public static void tick(@NotNull @NotNull net.minecraft.client.multiplayer.ClientLevel level)
    • getWindMovement

      @NotNull public static @NotNull net.minecraft.world.phys.Vec3 getWindMovement(@NotNull @NotNull net.minecraft.world.level.Level level, @NotNull @NotNull net.minecraft.core.BlockPos pos)
      Returns the wind movement at the bottom center of a specified BlockPos.
      Parameters:
      level - The Level to read from.
      pos - The BlockPos to check.
      Returns:
      the wind movement at the bottom center of the specified BlockPos.
    • getWindMovement

      @NotNull public static @NotNull net.minecraft.world.phys.Vec3 getWindMovement(@NotNull @NotNull net.minecraft.world.level.Level level, @NotNull @NotNull net.minecraft.core.BlockPos pos, double scale)
      Returns the wind movement at the bottom center of a specified BlockPos, multiplied.
      Parameters:
      level - The Level to read from.
      pos - The BlockPos to check.
      scale - Multiplies the returned value.
      Returns:
      the wind movement at the bottom center of the specified BlockPos, multiplied.
    • getWindMovement

      @NotNull public static @NotNull net.minecraft.world.phys.Vec3 getWindMovement(@NotNull @NotNull net.minecraft.world.level.Level level, @NotNull @NotNull net.minecraft.core.BlockPos pos, double scale, double clamp)
      Returns the wind movement at the bottom center of a specified BlockPos, multiplied and clamped.
      Parameters:
      level - The Level to read from.
      pos - The BlockPos to check.
      scale - Multiplies the returned value.
      clamp - Clamps the returned value between the negative and positive versions of this value.
      Returns:
      the wind movement at the bottom center of the specified BlockPos, multiplied and clamped.
    • getWindMovement

      @NotNull public static @NotNull net.minecraft.world.phys.Vec3 getWindMovement(@NotNull @NotNull net.minecraft.world.level.Level level, @NotNull @NotNull net.minecraft.world.phys.Vec3 pos)
      Returns the wind movement at the center of a specified Vec3.
      Parameters:
      level - The Level to read from.
      pos - The Vec3 to check.
      Returns:
      the wind movement at the specified Vec3.
    • getWindMovement

      @NotNull public static @NotNull net.minecraft.world.phys.Vec3 getWindMovement(@NotNull @NotNull net.minecraft.world.level.Level level, @NotNull @NotNull net.minecraft.world.phys.Vec3 pos, double scale)
      Returns the wind movement at a specified Vec3, multiplied.
      Parameters:
      level - The Level to read from.
      pos - The Vec3 to check.
      scale - Multiplies the returned value.
      Returns:
      the wind movement at the specified Vec3, multiplied.
    • getWindMovement

      @NotNull public static @NotNull net.minecraft.world.phys.Vec3 getWindMovement(@NotNull @NotNull net.minecraft.world.level.Level level, @NotNull @NotNull net.minecraft.world.phys.Vec3 pos, double scale, double clamp)
      Returns the wind movement at a specified Vec3, multiplied and clamped.
      Parameters:
      level - The Level to read from.
      pos - The BlockPos to check.
      scale - Multiplies the returned value.
      clamp - Clamps the returned value between the negative and positive versions of this value.
      Returns:
      the wind movement at the specified Vec3, multiplied and clamped.
    • getWindMovement

      @NotNull public static @NotNull net.minecraft.world.phys.Vec3 getWindMovement(@NotNull @NotNull net.minecraft.world.level.Level level, @NotNull @NotNull net.minecraft.world.phys.Vec3 pos, double scale, double clamp, double windDisturbanceScale)
      Returns the wind movement at a specified Vec3, multiplied, clamped, and with a separately multiplied wind disturbance value.
      Parameters:
      level - The Level to read from.
      pos - The BlockPos to check.
      scale - Multiplies the returned value.
      clamp - Clamps the returned value between the negative and positive versions of this value.
      windDisturbanceScale - Multiplies the wind disturbance value.
      Returns:
      the wind movement at the specified Vec3, multiplied, clamped, and with a separately multiplied wind disturbance value.
    • getRawDisturbanceMovement

      @NotNull public static @NotNull net.minecraft.world.phys.Vec3 getRawDisturbanceMovement(@NotNull @NotNull net.minecraft.world.level.Level level, @NotNull @NotNull net.minecraft.world.phys.Vec3 pos)
      Returns only the wind disturbance at the specified Vec3.
      Parameters:
      level - The Level to read from.
      pos - The BlockPos to check.
      Returns:
      the wind disturbance at the specified Vec3.
    • getWindMovement3D

      @Deprecated @NotNull public static @NotNull net.minecraft.world.phys.Vec3 getWindMovement3D(@NotNull @NotNull net.minecraft.core.BlockPos pos, double stretch)
      Deprecated.
    • getWindMovement3D

      @Deprecated @NotNull public static @NotNull net.minecraft.world.phys.Vec3 getWindMovement3D(@NotNull @NotNull net.minecraft.core.BlockPos pos, double scale, double stretch)
      Deprecated.
    • getWindMovement3D

      @Deprecated @NotNull public static @NotNull net.minecraft.world.phys.Vec3 getWindMovement3D(@NotNull @NotNull net.minecraft.core.BlockPos pos, double scale, double clamp, double stretch)
      Deprecated.
    • getWindMovement3D

      @Deprecated @NotNull public static @NotNull net.minecraft.world.phys.Vec3 getWindMovement3D(@NotNull @NotNull net.minecraft.world.phys.Vec3 pos, double stretch)
      Deprecated.
    • getWindMovement3D

      @Deprecated @NotNull public static @NotNull net.minecraft.world.phys.Vec3 getWindMovement3D(@NotNull @NotNull net.minecraft.world.phys.Vec3 pos, double scale, double stretch)
      Deprecated.
    • getWindMovement3D

      @Deprecated @NotNull public static @NotNull net.minecraft.world.phys.Vec3 getWindMovement3D(@NotNull @NotNull net.minecraft.world.phys.Vec3 pos, double scale, double clamp, double stretch)
      Deprecated.
    • sampleVec3

      @NotNull public static @NotNull net.minecraft.world.phys.Vec3 sampleVec3(@NotNull @NotNull net.minecraft.world.level.levelgen.synth.ImprovedNoise sampler, double x, double y, double z)
    • sample3D

      @Deprecated @NotNull public static @NotNull net.minecraft.world.phys.Vec3 sample3D(@NotNull @NotNull net.minecraft.world.phys.Vec3 pos, double stretch)
      Deprecated.