mirror of
https://github.com/FalsePattern/FalsePatternLib.git
synced 2026-11-16 10:44:50 +00:00
Extracted full texture icon
This commit is contained in:
1 parent
d3b1461664
commit
49ec327c97
2 files changed
+46
-46
No files matched your search
@@ -0,0 +1,44 @@
|
||||
package com.falsepattern.lib.internal.render;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public final class FullTextureIcon implements IIcon {
|
||||
private final String iconName;
|
||||
|
||||
private final int iconWidth;
|
||||
private final int iconHeight;
|
||||
|
||||
@Override
|
||||
public float getMinU() {
|
||||
return 0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMinV() {
|
||||
return 0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMaxU() {
|
||||
return 1F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMaxV() {
|
||||
return 1F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getInterpolatedU(double textureU) {
|
||||
return (float) textureU / 16F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getInterpolatedV(double textureV) {
|
||||
return (float) textureV / 16F;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user