mirror of
https://github.com/GTNewHorizons/CodeChickenCore.git
synced 2026-11-11 15:57:42 +00:00
21 lines
429 B
Java
21 lines
429 B
Java
package codechicken.lib.render;
|
|
|
|
import net.minecraft.util.Icon;
|
|
|
|
public class IconTransformation implements IUVTransformation
|
|
{
|
|
public Icon icon;
|
|
|
|
public IconTransformation(Icon icon)
|
|
{
|
|
this.icon = icon;
|
|
}
|
|
|
|
@Override
|
|
public void transform(UV texcoord)
|
|
{
|
|
texcoord.u = icon.getInterpolatedU(texcoord.u%2*16);
|
|
texcoord.v = icon.getInterpolatedV(texcoord.v%2*16);
|
|
}
|
|
}
|