类 TextureUtils

java.lang.Object
committee.nova.mods.avaritia.api.client.util.TextureUtils

public class TextureUtils extends Object
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    static final String
    药水图标文件夹路径
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    static void
    copySubImg(int[] fromTex, int fromWidth, int fromX, int fromY, int width, int height, int[] toTex, int toWidth, int toX, int toY)
     
    static net.minecraft.client.renderer.texture.TextureAtlasSprite
    获取指定命名空间的方块贴图
    static net.minecraft.client.renderer.texture.TextureAtlasSprite
    getBlockTexture(net.minecraft.resources.ResourceLocation location)
    获取指定命名空间的方块贴图
     
    getBufferedImage(net.minecraft.resources.ResourceLocation texture)
    从资源中加载纹理并转换为 BufferedImage。
    static net.minecraft.resources.ResourceLocation
    getEffectTexture(net.minecraft.world.effect.MobEffectInstance mobEffectInstance)
    获取药水效果图标
    static net.minecraft.client.renderer.texture.TextureAtlasSprite[]
    getIconsForBlock(net.minecraft.world.level.block.state.BlockState state, int side)
    已过时。
    static net.minecraft.client.renderer.texture.TextureAtlasSprite[]
    getIconsForBlock(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction side)
    已过时。
    static net.minecraft.client.renderer.texture.TextureAtlasSprite
    获取指定命名空间的物品贴图
    static net.minecraft.client.renderer.texture.TextureAtlasSprite
    getItemTexture(net.minecraft.resources.ResourceLocation location)
    获取指定命名空间的物品贴图
    static net.minecraft.client.renderer.texture.TextureAtlasSprite
    获取错误贴图
    static net.minecraft.client.renderer.texture.TextureAtlasSprite
    getParticleIconForBlock(net.minecraft.world.level.block.state.BlockState state)
    已过时。
    static net.minecraft.client.renderer.texture.TextureAtlasSprite[]
    getSideIconsForBlock(net.minecraft.world.level.block.state.BlockState state)
    已过时。
    static net.minecraft.client.renderer.texture.TextureAtlasSprite
    getTexture(String location)
    获取指定命名空间的任意贴图
    static net.minecraft.client.renderer.texture.TextureAtlasSprite
    getTexture(net.minecraft.resources.ResourceLocation location)
    获取指定命名空间的任意贴图
    static com.mojang.blaze3d.platform.NativeImage
    getTextureImage(net.minecraft.resources.ResourceLocation texture)
    从资源中加载纹理并转换为 NativeImage。
    static net.minecraft.client.renderer.texture.TextureManager
    获取贴图管理器
    static net.minecraft.client.renderer.texture.TextureAtlas
    获取贴图集
    static Color[]
    loadTextureColours(net.minecraft.resources.ResourceLocation resource)
     
    static int[]
    loadTextureData(net.minecraft.resources.ResourceLocation resource)
     
    static void
    prepareTexture(int target, int texture, int min_mag_filter, int wrap)
     

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 字段详细资料

    • DEFAULT_EFFECT_DIR

      public static final String DEFAULT_EFFECT_DIR
      药水图标文件夹路径
      另请参阅:
  • 构造器详细资料

    • TextureUtils

      public TextureUtils()
  • 方法详细资料

    • loadTextureData

      public static int[] loadTextureData(net.minecraft.resources.ResourceLocation resource)
      返回:
      an array of ARGB pixel data
    • loadTextureColours

      public static Color[] loadTextureColours(net.minecraft.resources.ResourceLocation resource)
    • getBufferedImage

      public static BufferedImage getBufferedImage(net.minecraft.resources.ResourceLocation texture)
      从资源中加载纹理并转换为 BufferedImage。
      参数:
      texture - 纹理的 ResourceLocation
      返回:
      纹理对应的 BufferedImage 或 null
    • getTextureImage

      public static com.mojang.blaze3d.platform.NativeImage getTextureImage(net.minecraft.resources.ResourceLocation texture)
      从资源中加载纹理并转换为 NativeImage。
      参数:
      texture - 纹理的 ResourceLocation
      返回:
      纹理对应的 NativeImage 或 null
    • getBufferedImage

      public static BufferedImage getBufferedImage(InputStream in) throws IOException
      抛出:
      IOException
    • copySubImg

      public static void copySubImg(int[] fromTex, int fromWidth, int fromX, int fromY, int width, int height, int[] toTex, int toWidth, int toX, int toY)
    • prepareTexture

      public static void prepareTexture(int target, int texture, int min_mag_filter, int wrap)
    • getTextureManager

      public static net.minecraft.client.renderer.texture.TextureManager getTextureManager()
      获取贴图管理器
    • getTextureMap

      public static net.minecraft.client.renderer.texture.TextureAtlas getTextureMap()
      获取贴图集
    • getMissingSprite

      public static net.minecraft.client.renderer.texture.TextureAtlasSprite getMissingSprite()
      获取错误贴图
    • getTexture

      public static net.minecraft.client.renderer.texture.TextureAtlasSprite getTexture(String location)
      获取指定命名空间的任意贴图
    • getTexture

      public static net.minecraft.client.renderer.texture.TextureAtlasSprite getTexture(net.minecraft.resources.ResourceLocation location)
      获取指定命名空间的任意贴图
    • getBlockTexture

      public static net.minecraft.client.renderer.texture.TextureAtlasSprite getBlockTexture(String string)
      获取指定命名空间的方块贴图
    • getBlockTexture

      public static net.minecraft.client.renderer.texture.TextureAtlasSprite getBlockTexture(net.minecraft.resources.ResourceLocation location)
      获取指定命名空间的方块贴图
      参数:
      location - 命名空间
      返回:
      贴图
    • getItemTexture

      public static net.minecraft.client.renderer.texture.TextureAtlasSprite getItemTexture(String string)
      获取指定命名空间的物品贴图
    • getItemTexture

      public static net.minecraft.client.renderer.texture.TextureAtlasSprite getItemTexture(net.minecraft.resources.ResourceLocation location)
      获取指定命名空间的物品贴图
    • getSideIconsForBlock

      @Deprecated public static net.minecraft.client.renderer.texture.TextureAtlasSprite[] getSideIconsForBlock(net.minecraft.world.level.block.state.BlockState state)
      已过时。
      获取方块所有方向的贴图
    • getIconsForBlock

      @Deprecated public static net.minecraft.client.renderer.texture.TextureAtlasSprite[] getIconsForBlock(net.minecraft.world.level.block.state.BlockState state, int side)
      已过时。
      获取方块指定方向的贴图
    • getIconsForBlock

      @Deprecated public static net.minecraft.client.renderer.texture.TextureAtlasSprite[] getIconsForBlock(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction side)
      已过时。
      获取方块指定方向的贴图
    • getParticleIconForBlock

      @Deprecated public static net.minecraft.client.renderer.texture.TextureAtlasSprite getParticleIconForBlock(net.minecraft.world.level.block.state.BlockState state)
      已过时。
      获取方块的粒子贴图
    • getEffectTexture

      public static net.minecraft.resources.ResourceLocation getEffectTexture(net.minecraft.world.effect.MobEffectInstance mobEffectInstance)
      获取药水效果图标