mirror of
https://github.com/GTNewHorizons/CodeChickenCore.git
synced 2026-11-15 09:34:53 +00:00
Initial 1.7 commit
This commit is contained in:
1 parent
34154fc011
commit
ca675b5f31
72 files changed
+2967
-3335
No files matched your search
@@ -0,0 +1,24 @@
|
||||
package codechicken.lib.render.uv;
|
||||
|
||||
import codechicken.lib.vec.IrreversibleTransformationException;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class MultiIconTransformation extends UVTransformation {
|
||||
public IIcon[] icons;
|
||||
|
||||
public MultiIconTransformation(IIcon... icons) {
|
||||
this.icons = icons;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(UV uv) {
|
||||
IIcon icon = icons[uv.tex % icons.length];
|
||||
uv.u = icon.getInterpolatedU(uv.u * 16);
|
||||
uv.v = icon.getInterpolatedV(uv.v * 16);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UVTransformation inverse() {
|
||||
throw new IrreversibleTransformationException(this);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user