Package net.minecraft.client.texture
Class Sprite.Interpolation
java.lang.Object
net.minecraft.client.texture.Sprite.Interpolation
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
- Sprite
@Environment(CLIENT) final class Sprite.Interpolation extends Object implements AutoCloseable
- Mappings:
Namespace Name official eru$dintermediary net/minecraft/class_1058$class_4728named net/minecraft/client/texture/Sprite$Interpolation
-
Field Summary
Fields Modifier and Type Field Description private NativeImage[]images -
Constructor Summary
Constructors Modifier Constructor Description privateInterpolation(Sprite.Info info, int mipmap) -
Method Summary
Modifier and Type Method Description private voidapply(Sprite.class_5790 class_5790)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).voidclose()private intgetPixelColor(Sprite.class_5790 class_5790, int int2, int int3, int int4, int int5)Returns the pixel color at frameframeIndexwithin mipmaplayerat sprite relative coordinates.private intlerp(double delta, int to, int from)Purely mathematical single-value linear interpolation.
-
Field Details
-
images
- Mappings:
Namespace Name Mixin selector official bLeru$d;b:[Ldky;intermediary field_21758Lnet/minecraft/class_1058$class_4728;field_21758:[Lnet/minecraft/class_1011;named imagesLnet/minecraft/client/texture/Sprite$Interpolation;images:[Lnet/minecraft/client/texture/NativeImage;
-
-
Constructor Details
-
Interpolation
- Mappings:
Namespace Name Mixin selector official <init>Leru$d;<init>(Leru;Leru$c;I)Vintermediary <init>Lnet/minecraft/class_1058$class_4728;<init>(Lnet/minecraft/class_1058;Lnet/minecraft/class_1058$class_4727;I)Vnamed <init>Lnet/minecraft/client/texture/Sprite$Interpolation;<init>(Lnet/minecraft/client/texture/Sprite;Lnet/minecraft/client/texture/Sprite$Info;I)V
-
-
Method Details
-
apply
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 aLeru$d;a(Leru$a;)Vintermediary method_24128Lnet/minecraft/class_1058$class_4728;method_24128(Lnet/minecraft/class_1058$class_5790;)Vnamed applyLnet/minecraft/client/texture/Sprite$Interpolation;apply(Lnet/minecraft/client/texture/Sprite$class_5790;)V
-
getPixelColor
Returns the pixel color at frameframeIndexwithin mipmaplayerat sprite relative coordinates.- Mappings:
Namespace Name Mixin selector official aLeru$d;a(Leru$a;IIII)Iintermediary method_24130Lnet/minecraft/class_1058$class_4728;method_24130(Lnet/minecraft/class_1058$class_5790;IIII)Inamed getPixelColorLnet/minecraft/client/texture/Sprite$Interpolation;getPixelColor(Lnet/minecraft/client/texture/Sprite$class_5790;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 aLeru$d;a(DII)Iintermediary method_24129Lnet/minecraft/class_1058$class_4728;method_24129(DII)Inamed lerpLnet/minecraft/client/texture/Sprite$Interpolation;lerp(DII)I
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Mappings:
Namespace Name Mixin selector official closeLeru$d;close()Vintermediary closeLnet/minecraft/class_1058$class_4728;close()Vnamed closeLnet/minecraft/client/texture/Sprite$Interpolation;close()V
-