Package com.unascribed.ears.common.main
Class EarsCommon
java.lang.Object
com.unascribed.ears.common.main.EarsCommon
Entrypoint to methods that are common to all ports of Ears.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final List<EarsCommon.Rectangle>A list of rectangles in a 64x64 skin that are forced to have their translucency removed by the vanilla skin loader. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic float[][]calculateUVs(int u, int v, int w, int h, EarsRenderDelegate.TexRotation rot, EarsRenderDelegate.TexFlip flip, EarsRenderDelegate.TexSource src) Calculate the needed UVs to render a quad with the given rotation and flip of the given texture.static float[][]calculateUVs(int u, int v, int w, int h, EarsRenderDelegate.TexRotation rot, EarsRenderDelegate.TexFlip flip, EarsRenderDelegate.TexSource src, float pinch) Calculate the needed UVs to render a quad with the given rotation and flip of the given texture, "pinching" the UVs in by the specified amount to avoid UV bleed.static voidcarefullyStripAlpha(EarsCommon.StripAlphaMethod sam, boolean sixtyFour) Callsamwith every rectangle inFORCED_OPAQUE_REGIONS.static Stringstatic StringgetConfigUrl(String username, String uuid) static doublelerpDelta(double prev, double cur, float tickDelta) static floatlerpDelta(float prev, float cur, float tickDelta) static AlfalfaDatastatic voidrender(EarsFeatures features, EarsRenderDelegate delegate) Render all the features described infeaturesusingdelegate.static booleanshouldSuppressElytra(EarsFeatures features)
-
Field Details
-
FORCED_OPAQUE_REGIONS
A list of rectangles in a 64x64 skin that are forced to have their translucency removed by the vanilla skin loader.
-
-
Constructor Details
-
EarsCommon
public EarsCommon()
-
-
Method Details
-
carefullyStripAlpha
Callsamwith every rectangle inFORCED_OPAQUE_REGIONS.Needed because vanilla minecraft uses rough rectangles that mess up a ton of unused pixels, which we give a use to.
-
lerpDelta
public static float lerpDelta(float prev, float cur, float tickDelta) -
lerpDelta
public static double lerpDelta(double prev, double cur, float tickDelta) -
shouldSuppressElytra
-
getConfigPreviewUrl
-
getConfigUrl
-
preprocessSkin
-
render
Render all the features described infeaturesusingdelegate. -
calculateUVs
public static float[][] calculateUVs(int u, int v, int w, int h, EarsRenderDelegate.TexRotation rot, EarsRenderDelegate.TexFlip flip, EarsRenderDelegate.TexSource src) Calculate the needed UVs to render a quad with the given rotation and flip of the given texture. -
calculateUVs
public static float[][] calculateUVs(int u, int v, int w, int h, EarsRenderDelegate.TexRotation rot, EarsRenderDelegate.TexFlip flip, EarsRenderDelegate.TexSource src, float pinch) Calculate the needed UVs to render a quad with the given rotation and flip of the given texture, "pinching" the UVs in by the specified amount to avoid UV bleed.
-