Class EarsCommon

java.lang.Object
com.unascribed.ears.common.main.EarsCommon

public class EarsCommon extends Object
Entrypoint to methods that are common to all ports of Ears.
  • Field Details

    • FORCED_OPAQUE_REGIONS

      public static final List<EarsCommon.Rectangle> 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

      public static void carefullyStripAlpha(EarsCommon.StripAlphaMethod sam, boolean sixtyFour)
      Call sam with every rectangle in FORCED_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

      public static boolean shouldSuppressElytra(EarsFeatures features)
    • getConfigPreviewUrl

      public static String getConfigPreviewUrl()
    • getConfigUrl

      public static String getConfigUrl(String username, String uuid)
    • preprocessSkin

      public static AlfalfaData preprocessSkin(WritableEarsImage img)
    • render

      public static void render(EarsFeatures features, EarsRenderDelegate delegate)
      Render all the features described in features using delegate.
    • 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.