Package net.frozenblock.lib.wind.api
Class ClientWindManager
java.lang.Object
net.frozenblock.lib.wind.api.ClientWindManager
Handles wind on the client side.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic net.minecraft.world.phys.Vec3static final List<ClientWindManagerExtension> static booleanstatic doublestatic doublestatic doublestatic net.minecraft.world.level.levelgen.synth.ImprovedNoisestatic booleanstatic doublestatic doublestatic doublestatic doublestatic doublestatic doublestatic longstatic doublestatic doublestatic double -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddExtension(@Nullable Supplier<ClientWindManagerExtension> extension) Adds aClientWindManagerExtension.static voidaddExtension(@Nullable ClientWindManagerExtension extension) Adds aClientWindManagerExtension.static voidaddWindDisturbance(@NotNull WindDisturbance<?> windDisturbance) static voidstatic voidstatic voidstatic @NotNull net.minecraft.world.phys.Vec3getRawDisturbanceMovement(@NotNull net.minecraft.world.level.Level level, @NotNull net.minecraft.world.phys.Vec3 pos) Returns only the wind disturbance at the specifiedVec3.static List<WindDisturbance<?>> static List<WindDisturbance<?>> static @NotNull net.minecraft.world.phys.Vec3getWindMovement(@NotNull net.minecraft.world.level.Level level, @NotNull net.minecraft.core.BlockPos pos) Returns the wind movement at the bottom center of a specifiedBlockPos.static @NotNull net.minecraft.world.phys.Vec3getWindMovement(@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 specifiedBlockPos, multiplied.static @NotNull net.minecraft.world.phys.Vec3getWindMovement(@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 specifiedBlockPos, multiplied and clamped.static @NotNull net.minecraft.world.phys.Vec3getWindMovement(@NotNull net.minecraft.world.level.Level level, @NotNull net.minecraft.world.phys.Vec3 pos) Returns the wind movement at the center of a specifiedVec3.static @NotNull net.minecraft.world.phys.Vec3getWindMovement(@NotNull net.minecraft.world.level.Level level, @NotNull net.minecraft.world.phys.Vec3 pos, double scale) Returns the wind movement at a specifiedVec3, multiplied.static @NotNull net.minecraft.world.phys.Vec3getWindMovement(@NotNull net.minecraft.world.level.Level level, @NotNull net.minecraft.world.phys.Vec3 pos, double scale, double clamp) Returns the wind movement at a specifiedVec3, multiplied and clamped.static @NotNull net.minecraft.world.phys.Vec3getWindMovement(@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 specifiedVec3, multiplied, clamped, and with a separately multiplied wind disturbance value.static @NotNull net.minecraft.world.phys.Vec3getWindMovement3D(@NotNull net.minecraft.core.BlockPos pos, double stretch) Deprecated.static @NotNull net.minecraft.world.phys.Vec3getWindMovement3D(@NotNull net.minecraft.core.BlockPos pos, double scale, double stretch) Deprecated.static @NotNull net.minecraft.world.phys.Vec3getWindMovement3D(@NotNull net.minecraft.core.BlockPos pos, double scale, double clamp, double stretch) Deprecated.static @NotNull net.minecraft.world.phys.Vec3getWindMovement3D(@NotNull net.minecraft.world.phys.Vec3 pos, double stretch) Deprecated.static @NotNull net.minecraft.world.phys.Vec3getWindMovement3D(@NotNull net.minecraft.world.phys.Vec3 pos, double scale, double stretch) Deprecated.static @NotNull net.minecraft.world.phys.Vec3getWindMovement3D(@NotNull net.minecraft.world.phys.Vec3 pos, double scale, double clamp, double stretch) Deprecated.static doublegetWindX(float partialTick) static doublegetWindY(float partialTick) static doublegetWindZ(float partialTick) static @NotNull net.minecraft.world.phys.Vec3sample3D(@NotNull net.minecraft.world.phys.Vec3 pos, double stretch) Deprecated.static @NotNull net.minecraft.world.phys.Vec3sampleVec3(@NotNull net.minecraft.world.level.levelgen.synth.ImprovedNoise sampler, double x, double y, double z) static voidsetSeed(long seed) static booleanstatic voidtick(@NotNull net.minecraft.client.multiplayer.ClientLevel level)
-
Field Details
-
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
-
getWindDisturbanceStash
-
clearWindDisturbances
public static void clearWindDisturbances() -
clearAllWindDisturbances
public static void clearAllWindDisturbances() -
clearAndSwitchWindDisturbances
public static void clearAndSwitchWindDisturbances() -
addWindDisturbance
-
addExtension
Adds aClientWindManagerExtension.- Parameters:
extension- theClientWindManagerExtensionto add.
-
addExtension
Adds aClientWindManagerExtension.- Parameters:
extension- theClientWindManagerExtensionto 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 specifiedBlockPos.- Parameters:
level- TheLevelto read from.pos- TheBlockPosto 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 specifiedBlockPos, multiplied.- Parameters:
level- TheLevelto read from.pos- TheBlockPosto 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 specifiedBlockPos, multiplied and clamped.- Parameters:
level- TheLevelto read from.pos- TheBlockPosto 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 specifiedVec3.- Parameters:
level- TheLevelto read from.pos- TheVec3to 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 specifiedVec3, multiplied.- Parameters:
level- TheLevelto read from.pos- TheVec3to 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 specifiedVec3, multiplied and clamped.- Parameters:
level- TheLevelto read from.pos- TheBlockPosto 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 specifiedVec3, multiplied, clamped, and with a separately multiplied wind disturbance value.- Parameters:
level- TheLevelto read from.pos- TheBlockPosto 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 specifiedVec3.- Parameters:
level- TheLevelto read from.pos- TheBlockPosto 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.
-