本文整理匯總了Java中net.minecraft.client.renderer.texture.TextureManager.getTexture方法的典型用法代碼示例。如果您正苦於以下問題:Java TextureManager.getTexture方法的具體用法?Java TextureManager.getTexture怎麽用?Java TextureManager.getTexture使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.client.renderer.texture.TextureManager
的用法示例。
在下文中一共展示了TextureManager.getTexture方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: updateTextureMinMagFilter
import net.minecraft.client.renderer.texture.TextureManager; //導入方法依賴的package包/類
static void updateTextureMinMagFilter()
{
TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
ITextureObject itextureobject = texturemanager.getTexture(TextureMap.locationBlocksTexture);
if (itextureobject != null)
{
MultiTexID multitexid = itextureobject.getMultiTexID();
GlStateManager.bindTexture(multitexid.base);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, Shaders.texMinFilValue[Shaders.configTexMinFilB]);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, Shaders.texMagFilValue[Shaders.configTexMagFilB]);
GlStateManager.bindTexture(multitexid.norm);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, Shaders.texMinFilValue[Shaders.configTexMinFilN]);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, Shaders.texMagFilValue[Shaders.configTexMagFilN]);
GlStateManager.bindTexture(multitexid.spec);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, Shaders.texMinFilValue[Shaders.configTexMinFilS]);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, Shaders.texMagFilValue[Shaders.configTexMagFilS]);
GlStateManager.bindTexture(0);
}
}
示例2: updateTextureMinMagFilter
import net.minecraft.client.renderer.texture.TextureManager; //導入方法依賴的package包/類
static void updateTextureMinMagFilter()
{
TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
ITextureObject itextureobject = texturemanager.getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
if (itextureobject != null)
{
MultiTexID multitexid = itextureobject.getMultiTexID();
GlStateManager.bindTexture(multitexid.base);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, Shaders.texMinFilValue[Shaders.configTexMinFilB]);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, Shaders.texMagFilValue[Shaders.configTexMagFilB]);
GlStateManager.bindTexture(multitexid.norm);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, Shaders.texMinFilValue[Shaders.configTexMinFilN]);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, Shaders.texMagFilValue[Shaders.configTexMagFilN]);
GlStateManager.bindTexture(multitexid.spec);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, Shaders.texMinFilValue[Shaders.configTexMinFilS]);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, Shaders.texMagFilValue[Shaders.configTexMagFilS]);
GlStateManager.bindTexture(0);
}
}
示例3: getTextureWidth
import net.minecraft.client.renderer.texture.TextureManager; //導入方法依賴的package包/類
public float getTextureWidth(TextureManager p_getTextureWidth_1_)
{
if (this.textureWidth <= 0)
{
if (this.textureLocation != null)
{
ITextureObject itextureobject = p_getTextureWidth_1_.getTexture(this.textureLocation);
int i = itextureobject.getGlTextureId();
int j = GlStateManager.getBoundTexture();
GlStateManager.bindTexture(i);
this.textureWidth = GL11.glGetTexLevelParameteri(GL11.GL_TEXTURE_2D, 0, GL11.GL_TEXTURE_WIDTH);
GlStateManager.bindTexture(j);
}
if (this.textureWidth <= 0)
{
this.textureWidth = 16;
}
}
return (float)this.textureWidth;
}
示例4: getTextureHeight
import net.minecraft.client.renderer.texture.TextureManager; //導入方法依賴的package包/類
public float getTextureHeight(TextureManager p_getTextureHeight_1_)
{
if (this.textureHeight <= 0)
{
if (this.textureLocation != null)
{
ITextureObject itextureobject = p_getTextureHeight_1_.getTexture(this.textureLocation);
int i = itextureobject.getGlTextureId();
int j = GlStateManager.getBoundTexture();
GlStateManager.bindTexture(i);
this.textureHeight = GL11.glGetTexLevelParameteri(GL11.GL_TEXTURE_2D, 0, GL11.GL_TEXTURE_HEIGHT);
GlStateManager.bindTexture(j);
}
if (this.textureHeight <= 0)
{
this.textureHeight = 16;
}
}
return (float)this.textureHeight;
}
示例5: bindTextureMapForUpdateAndRender
import net.minecraft.client.renderer.texture.TextureManager; //導入方法依賴的package包/類
public static void bindTextureMapForUpdateAndRender(TextureManager tm, ResourceLocation resLoc)
{
TextureMap texturemap = (TextureMap)tm.getTexture(resLoc);
Shaders.atlasSizeX = texturemap.atlasWidth;
Shaders.atlasSizeY = texturemap.atlasHeight;
bindTextures(updatingTex = texturemap.getMultiTexID());
}
示例6: downloadCape
import net.minecraft.client.renderer.texture.TextureManager; //導入方法依賴的package包/類
public static void downloadCape(final AbstractClientPlayer p_downloadCape_0_)
{
String s = p_downloadCape_0_.getNameClear();
if (s != null && !s.isEmpty())
{
String s1 = "http://s.optifine.net/capes/" + s + ".png";
String s2 = FilenameUtils.getBaseName(s1);
final ResourceLocation resourcelocation = new ResourceLocation("capeof/" + s2);
TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
ITextureObject itextureobject = texturemanager.getTexture(resourcelocation);
if (itextureobject != null && itextureobject instanceof ThreadDownloadImageData)
{
ThreadDownloadImageData threaddownloadimagedata = (ThreadDownloadImageData)itextureobject;
if (threaddownloadimagedata.imageFound != null)
{
if (threaddownloadimagedata.imageFound.booleanValue())
{
p_downloadCape_0_.setLocationOfCape(resourcelocation);
}
return;
}
}
IImageBuffer iimagebuffer = new IImageBuffer()
{
ImageBufferDownload ibd = new ImageBufferDownload();
public BufferedImage parseUserSkin(BufferedImage image)
{
return CapeUtils.parseCape(image);
}
public void skinAvailable()
{
p_downloadCape_0_.setLocationOfCape(resourcelocation);
}
};
ThreadDownloadImageData threaddownloadimagedata1 = new ThreadDownloadImageData((File)null, s1, (ResourceLocation)null, iimagebuffer);
threaddownloadimagedata1.pipeline = true;
texturemanager.loadTexture(resourcelocation, threaddownloadimagedata1);
}
}
示例7: downloadCape
import net.minecraft.client.renderer.texture.TextureManager; //導入方法依賴的package包/類
private void downloadCape(String p_downloadCape_1_)
{
if (p_downloadCape_1_ != null && !p_downloadCape_1_.isEmpty())
{
p_downloadCape_1_ = StringUtils.stripControlCodes(p_downloadCape_1_);
String s = "http://s.optifine.net/capes/" + p_downloadCape_1_ + ".png";
String s1 = FilenameUtils.getBaseName(s);
final ResourceLocation resourcelocation = new ResourceLocation("capeof/" + s1);
TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
ITextureObject itextureobject = texturemanager.getTexture(resourcelocation);
if (itextureobject != null && itextureobject instanceof ThreadDownloadImageData)
{
ThreadDownloadImageData threaddownloadimagedata = (ThreadDownloadImageData)itextureobject;
if (threaddownloadimagedata.imageFound != null)
{
if (threaddownloadimagedata.imageFound.booleanValue())
{
this.ofLocationCape = resourcelocation;
}
return;
}
}
IImageBuffer iimagebuffer = new IImageBuffer()
{
ImageBufferDownload ibd = new ImageBufferDownload();
public BufferedImage parseUserSkin(BufferedImage image)
{
return AbstractClientPlayer.this.parseCape(image);
}
public void skinAvailable()
{
AbstractClientPlayer.this.ofLocationCape = resourcelocation;
}
};
ThreadDownloadImageData threaddownloadimagedata1 = new ThreadDownloadImageData((File)null, s, (ResourceLocation)null, iimagebuffer);
texturemanager.loadTexture(resourcelocation, threaddownloadimagedata1);
}
}