类 TextureUtils
java.lang.Object
committee.nova.mods.avaritia.api.client.util.TextureUtils
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static voidcopySubImg(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.TextureAtlasSpritegetBlockTexture(String string) 获取指定命名空间的方块贴图static net.minecraft.client.renderer.texture.TextureAtlasSpritegetBlockTexture(net.minecraft.resources.ResourceLocation location) 获取指定命名空间的方块贴图static BufferedImagestatic BufferedImagegetBufferedImage(net.minecraft.resources.ResourceLocation texture) 从资源中加载纹理并转换为 BufferedImage。static net.minecraft.resources.ResourceLocationgetEffectTexture(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.TextureAtlasSpritegetItemTexture(String string) 获取指定命名空间的物品贴图static net.minecraft.client.renderer.texture.TextureAtlasSpritegetItemTexture(net.minecraft.resources.ResourceLocation location) 获取指定命名空间的物品贴图static net.minecraft.client.renderer.texture.TextureAtlasSprite获取错误贴图static net.minecraft.client.renderer.texture.TextureAtlasSpritegetParticleIconForBlock(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.TextureAtlasSpritegetTexture(String location) 获取指定命名空间的任意贴图static net.minecraft.client.renderer.texture.TextureAtlasSpritegetTexture(net.minecraft.resources.ResourceLocation location) 获取指定命名空间的任意贴图static com.mojang.blaze3d.platform.NativeImagegetTextureImage(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 voidprepareTexture(int target, int texture, int min_mag_filter, int wrap)
-
字段详细资料
-
DEFAULT_EFFECT_DIR
药水图标文件夹路径- 另请参阅:
-
-
构造器详细资料
-
TextureUtils
public TextureUtils()
-
-
方法详细资料
-
loadTextureData
public static int[] loadTextureData(net.minecraft.resources.ResourceLocation resource) - 返回:
- an array of ARGB pixel data
-
loadTextureColours
-
getBufferedImage
从资源中加载纹理并转换为 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
- 抛出:
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
获取指定命名空间的任意贴图 -
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) 获取药水效果图标
-