本文整理汇总了Java中net.minecraft.client.renderer.texture.SimpleTexture类的典型用法代码示例。如果您正苦于以下问题:Java SimpleTexture类的具体用法?Java SimpleTexture怎么用?Java SimpleTexture使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SimpleTexture类属于net.minecraft.client.renderer.texture包,在下文中一共展示了SimpleTexture类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTexture
import net.minecraft.client.renderer.texture.SimpleTexture; //导入依赖的package包/类
public static ITextureObject getTexture(ResourceLocation p_getTexture_0_)
{
ITextureObject itextureobject = Config.getTextureManager().getTexture(p_getTexture_0_);
if (itextureobject != null)
{
return itextureobject;
}
else if (!Config.hasResource(p_getTexture_0_))
{
return null;
}
else
{
SimpleTexture simpletexture = new SimpleTexture(p_getTexture_0_);
Config.getTextureManager().loadTexture(p_getTexture_0_, simpletexture);
return simpletexture;
}
}
示例2: getTexture
import net.minecraft.client.renderer.texture.SimpleTexture; //导入依赖的package包/类
public static ITextureObject getTexture(ResourceLocation loc)
{
ITextureObject tex = Config.getTextureManager().getTexture(loc);
if (tex != null)
{
return tex;
}
else if (!Config.hasResource(loc))
{
return null;
}
else
{
SimpleTexture tex1 = new SimpleTexture(loc);
Config.getTextureManager().loadTexture(loc, tex1);
return tex1;
}
}
示例3: onFMLLoadComplete
import net.minecraft.client.renderer.texture.SimpleTexture; //导入依赖的package包/类
@EventHandler
@SideOnly(Side.CLIENT)
public void onFMLLoadComplete(FMLLoadCompleteEvent event) {
TextureManager textureManager = Minecraft.getMinecraft().getTextureManager();
textureManager.loadTexture(GuiWardrobe.BACKGROUND_TEXTURES, new SimpleTexture(GuiWardrobe.BACKGROUND_TEXTURES));
textureManager.loadTexture(GuiWardrobe.BUTTON_TEXTURES, new SimpleTexture(GuiWardrobe.BUTTON_TEXTURES));
}
示例4: inflate
import net.minecraft.client.renderer.texture.SimpleTexture; //导入依赖的package包/类
@Override
public void inflate(XmlHelper node, Style theme) {
size = node.getSize(GuiManager.NS, originalSize.clone());
try {
Integer textureId = node.getIntegerAttr(GuiManager.NS, "texture", null);
} catch (NumberFormatException e) {
ResourceLocation src = node.getResourceAttr(GuiManager.NS, "texture", null);
if (src != null) {
SimpleTexture texture = new SimpleTexture(src);
// texture.loadTexture();
}
}
}
示例5: registerLivery
import net.minecraft.client.renderer.texture.SimpleTexture; //导入依赖的package包/类
public static void registerLivery(String name, String packName) {
if (name == null || name.isEmpty()) return;
if (!map.keySet().contains(name)) {
LiveryTextureInfo info = new LiveryTextureInfo();
info.packName = packName;
info.texture = new ResourceLocation("cartlivery", "textures/livery/" + name + ".png");
map.put(name, info);
Minecraft.getMinecraft().renderEngine.loadTexture(info.texture, new SimpleTexture(info.texture));
}
}
示例6: ThreadDownloadImageData
import net.minecraft.client.renderer.texture.SimpleTexture; //导入依赖的package包/类
public ThreadDownloadImageData(String p_i1273_1_, ResourceLocation p_i1273_2_, IImageBuffer p_i1273_3_) {
this.field_110562_b = p_i1273_1_;
this.field_110563_c = p_i1273_3_;
this.field_110558_f = p_i1273_2_ != null?new SimpleTexture(p_i1273_2_):null;
}
示例7: ThreadDownloadImageData
import net.minecraft.client.renderer.texture.SimpleTexture; //导入依赖的package包/类
public ThreadDownloadImageData(String par1Str, ResourceLocation par2ResourceLocation, IImageBuffer par3IImageBuffer)
{
this.imageUrl = par1Str;
this.imageBuffer = par3IImageBuffer;
this.imageLocation = par2ResourceLocation != null ? new SimpleTexture(par2ResourceLocation) : null;
}