Interface Easing

All Known Implementing Classes:
ChainEasing, ClampEasing, ColorEasing, CompoundEasing, ConstantEasing, DoubleArgumentEasing, LerpEasing, SimpleEasing, SingleArgumentEasing, SplineEasing

public interface Easing
An easing smoothly transitions from value 0 to value 1. At least, in places it's meant to be an easing. In other cases, it can be treated as a math function that takes in an argument in range [0, 1] and returns something else from it. To get an idea what an easing (in its intended usage) is, as well as the visual representations of simple (or legacy) easings, check out easings.net
See Also:
  • Field Details

    • LOGGER

      static final org.slf4j.Logger LOGGER
    • EASING_MACROS

      static final Map<net.minecraft.resources.ResourceLocation,Easing> EASING_MACROS
  • Method Details

    • get

      double get(double t)
      Returns the eased value from given t
      Parameters:
      t - the initial progress (linear)
      Returns:
      the eased value
    • getSerializer

      EasingSerializer<?> getSerializer()
      Returns:
      a serializer that creates easings of this type
    • toNetwork

      @Deprecated void toNetwork(net.minecraft.network.FriendlyByteBuf buf)
      Deprecated.
    • toNetwork

      static void toNetwork(Easing easing, net.minecraft.network.FriendlyByteBuf buf)
    • fromJSON

      static Easing fromJSON(@NotNull @NotNull com.google.gson.JsonElement json)
    • fromJSON

      static Easing fromJSON(@NotNull @NotNull com.google.gson.JsonElement json, LoadResolver<Easing> context)
    • fromJSON

      static Easing fromJSON(@Nullable @Nullable com.google.gson.JsonElement json, Easing fallback)
    • fromJSONPrimitive

      static Easing fromJSONPrimitive(com.google.gson.JsonPrimitive json)
    • fromJSONPrimitive

      static Easing fromJSONPrimitive(com.google.gson.JsonPrimitive json, LoadResolver<Easing> context)
    • fromNetwork

      static Easing fromNetwork(net.minecraft.network.FriendlyByteBuf buf)