Class Sprite.Interpolation

java.lang.Object
net.minecraft.client.texture.Sprite.Interpolation
All Implemented Interfaces:
AutoCloseable
Enclosing class:
Sprite

@Environment(CLIENT) private final class Sprite.Interpolation extends Object implements AutoCloseable
Mappings:
Namespace Name
official exl$d
intermediary net/minecraft/class_1058$class_4728
named net/minecraft/client/texture/Sprite$Interpolation
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private NativeImage[]
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Interpolation​(Sprite.Info info, int int2)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) void
    apply​(Sprite.Animation animation)
    Linearly interpolate between the current and next frame on all mip levels based on the tick position within the current frame, and upload the results to the currently bound texture to the frame slot at position (0,0).
    void
     
    private int
    getPixelColor​(Sprite.Animation animation, int frameIndex, int layer, int x, int y)
    Returns the pixel color at frame frameIndex within mipmap layer at sprite relative coordinates.
    private int
    lerp​(double delta, int to, int from)
    Purely mathematical single-value linear interpolation.

    Methods inherited from class java.lang.Object

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

    • images

      private final NativeImage[] images
      Mappings:
      Namespace Name Mixin selector
      official b Lexl$d;b:[Ldpl;
      intermediary field_21758 Lnet/minecraft/class_1058$class_4728;field_21758:[Lnet/minecraft/class_1011;
      named images Lnet/minecraft/client/texture/Sprite$Interpolation;images:[Lnet/minecraft/client/texture/NativeImage;
  • Constructor Details

    • Interpolation

      Interpolation(Sprite.Info info, int int2)
  • Method Details

    • apply

      void apply(Sprite.Animation animation)
      Linearly interpolate between the current and next frame on all mip levels based on the tick position within the current frame, and upload the results to the currently bound texture to the frame slot at position (0,0).
      Mappings:
      Namespace Name Mixin selector
      official a Lexl$d;a(Lexl$a;)V
      intermediary method_24128 Lnet/minecraft/class_1058$class_4728;method_24128(Lnet/minecraft/class_1058$class_5790;)V
      named apply Lnet/minecraft/client/texture/Sprite$Interpolation;apply(Lnet/minecraft/client/texture/Sprite$Animation;)V
    • getPixelColor

      private int getPixelColor(Sprite.Animation animation, int frameIndex, int layer, int x, int y)
      Returns the pixel color at frame frameIndex within mipmap layer at sprite relative coordinates.
      Mappings:
      Namespace Name Mixin selector
      official a Lexl$d;a(Lexl$a;IIII)I
      intermediary method_24130 Lnet/minecraft/class_1058$class_4728;method_24130(Lnet/minecraft/class_1058$class_5790;IIII)I
      named getPixelColor Lnet/minecraft/client/texture/Sprite$Interpolation;getPixelColor(Lnet/minecraft/client/texture/Sprite$Animation;IIII)I
    • lerp

      private int lerp(double delta, int to, int from)
      Purely mathematical single-value linear interpolation. lerp(0, a, b) == b, lerp(1, a, b) == a.
      Mappings:
      Namespace Name Mixin selector
      official a Lexl$d;a(DII)I
      intermediary method_24129 Lnet/minecraft/class_1058$class_4728;method_24129(DII)I
      named lerp Lnet/minecraft/client/texture/Sprite$Interpolation;lerp(DII)I
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable