@SideOnly(Side.CLIENT)
public static void renderItemInWorld(ItemStack stack){
if(!stack.isEmpty()){
Minecraft mc = Minecraft.getMinecraft();
RenderItem renderer = mc.getRenderItem();
TextureManager manager = mc.getTextureManager();
IBakedModel model = renderer.getItemModelWithOverrides(stack, null, null);
manager.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
manager.getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).setBlurMipmap(false, false);
GlStateManager.enableRescaleNormal();
GlStateManager.enableBlend();
GlStateManager.pushMatrix();
model = ForgeHooksClient.handleCameraTransforms(model, ItemCameraTransforms.TransformType.FIXED, false);
renderer.renderItem(stack, model);
GlStateManager.cullFace(GlStateManager.CullFace.BACK);
GlStateManager.popMatrix();
GlStateManager.disableRescaleNormal();
GlStateManager.disableBlend();
manager.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
manager.getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).restoreLastBlurMipmap();
}
}
java类net.minecraft.client.renderer.texture.TextureManager的实例源码
Util.java 文件源码
项目:Metalworks
阅读 23
收藏 0
点赞 0
评论 0
EffectRenderer.java 文件源码
项目:DecompiledMinecraft
阅读 28
收藏 0
点赞 0
评论 0
public EffectRenderer(World worldIn, TextureManager rendererIn)
{
this.worldObj = worldIn;
this.renderer = rendererIn;
for (int i = 0; i < 4; ++i)
{
this.fxLayers[i] = new List[2];
for (int j = 0; j < 2; ++j)
{
this.fxLayers[i][j] = Lists.newArrayList();
}
}
this.registerVanillaParticles();
}
TileEntityRendererDispatcher.java 文件源码
项目:DecompiledMinecraft
阅读 22
收藏 0
点赞 0
评论 0
public void cacheActiveRenderInfo(World worldIn, TextureManager textureManagerIn, FontRenderer fontrendererIn, Entity entityIn, float partialTicks)
{
if (this.worldObj != worldIn)
{
this.setWorld(worldIn);
}
this.renderEngine = textureManagerIn;
this.entity = entityIn;
this.fontRenderer = fontrendererIn;
this.entityYaw = entityIn.prevRotationYaw + (entityIn.rotationYaw - entityIn.prevRotationYaw) * partialTicks;
this.entityPitch = entityIn.prevRotationPitch + (entityIn.rotationPitch - entityIn.prevRotationPitch) * partialTicks;
this.entityX = entityIn.lastTickPosX + (entityIn.posX - entityIn.lastTickPosX) * (double)partialTicks;
this.entityY = entityIn.lastTickPosY + (entityIn.posY - entityIn.lastTickPosY) * (double)partialTicks;
this.entityZ = entityIn.lastTickPosZ + (entityIn.posZ - entityIn.lastTickPosZ) * (double)partialTicks;
}
ShadersTex.java 文件源码
项目:BaseClient
阅读 32
收藏 0
点赞 0
评论 0
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);
}
}
CustomItemProperties.java 文件源码
项目:BaseClient
阅读 24
收藏 0
点赞 0
评论 0
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;
}
CustomItemProperties.java 文件源码
项目:Backmemed
阅读 27
收藏 0
点赞 0
评论 0
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;
}
EffectRenderer.java 文件源码
项目:BaseClient
阅读 25
收藏 0
点赞 0
评论 0
public EffectRenderer(World worldIn, TextureManager rendererIn)
{
this.worldObj = worldIn;
this.renderer = rendererIn;
for (int i = 0; i < 4; ++i)
{
this.fxLayers[i] = new List[2];
for (int j = 0; j < 2; ++j)
{
this.fxLayers[i][j] = Lists.newArrayList();
}
}
this.registerVanillaParticles();
}
RenderItem.java 文件源码
项目:BaseClient
阅读 29
收藏 0
点赞 0
评论 0
public RenderItem(TextureManager textureManager, ModelManager modelManager)
{
this.textureManager = textureManager;
Config.setModelManager(modelManager);
if (Reflector.ItemModelMesherForge_Constructor.exists())
{
this.itemModelMesher = (ItemModelMesher)Reflector.newInstance(Reflector.ItemModelMesherForge_Constructor, new Object[] {modelManager});
}
else
{
this.itemModelMesher = new ItemModelMesher(modelManager);
}
this.registerItems();
}
ParticleManager.java 文件源码
项目:CustomWorldGen
阅读 20
收藏 0
点赞 0
评论 0
public ParticleManager(World worldIn, TextureManager rendererIn)
{
this.worldObj = worldIn;
this.renderer = rendererIn;
for (int i = 0; i < 4; ++i)
{
this.fxLayers[i] = new ArrayDeque[2];
for (int j = 0; j < 2; ++j)
{
this.fxLayers[i][j] = Queues.newArrayDeque();
}
}
this.registerVanillaParticles();
}
EffectRenderer.java 文件源码
项目:BaseClient
阅读 23
收藏 0
点赞 0
评论 0
public EffectRenderer(World worldIn, TextureManager rendererIn)
{
this.worldObj = worldIn;
this.renderer = rendererIn;
for (int i = 0; i < 4; ++i)
{
this.fxLayers[i] = new List[2];
for (int j = 0; j < 2; ++j)
{
this.fxLayers[i][j] = Lists.newArrayList();
}
}
this.registerVanillaParticles();
}
TileEntityRendererDispatcher.java 文件源码
项目:BaseClient
阅读 31
收藏 0
点赞 0
评论 0
public void cacheActiveRenderInfo(World worldIn, TextureManager textureManagerIn, FontRenderer fontrendererIn, Entity entityIn, float partialTicks)
{
if (this.worldObj != worldIn)
{
this.setWorld(worldIn);
}
this.renderEngine = textureManagerIn;
this.entity = entityIn;
this.fontRenderer = fontrendererIn;
this.entityYaw = entityIn.prevRotationYaw + (entityIn.rotationYaw - entityIn.prevRotationYaw) * partialTicks;
this.entityPitch = entityIn.prevRotationPitch + (entityIn.rotationPitch - entityIn.prevRotationPitch) * partialTicks;
this.entityX = entityIn.lastTickPosX + (entityIn.posX - entityIn.lastTickPosX) * (double)partialTicks;
this.entityY = entityIn.lastTickPosY + (entityIn.posY - entityIn.lastTickPosY) * (double)partialTicks;
this.entityZ = entityIn.lastTickPosZ + (entityIn.posZ - entityIn.lastTickPosZ) * (double)partialTicks;
}
CustomItemProperties.java 文件源码
项目:Backmemed
阅读 28
收藏 0
点赞 0
评论 0
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;
}
PowerOverlayRender.java 文件源码
项目:PowerProbe
阅读 34
收藏 0
点赞 0
评论 0
private void render(EntityPlayerSP player, float partialTicks) {
double x = player.lastTickPosX + (player.posX - player.lastTickPosX) * partialTicks;
double y = player.lastTickPosY + (player.posY - player.lastTickPosY) * partialTicks;
double z = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * partialTicks;
TextureManager tm = Minecraft.getMinecraft().renderEngine;
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
GL11.glPushMatrix();
GL11.glColor4f(1.0f, 1.0f, 1.0f, 0.3f);
GL11.glEnable(GL11.GL_BLEND);
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
if (areaOverlays != null) {
for (PowerOverlayData overlay : areaOverlays) {
drawIconVectors(x, y, z, tm, overlay);
}
}
drawIconVectors(x, y, z, tm, cursorOverlay);
GL11.glPopMatrix();
GL11.glPopAttrib();
}
PowerOverlayRender.java 文件源码
项目:PowerProbe
阅读 33
收藏 0
点赞 0
评论 0
private void drawIconVectors(double x, double y, double z, TextureManager tm, PowerOverlayData overlay) {
if (overlay == null || overlay.pos == null || overlay.power < 1) {
return;
}
VertexBuffer vb;
tm.bindTexture(ICONS_TEXTURE);
vb = Tessellator.getInstance().getBuffer();
vb.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
vb.setTranslation(-x, -y, -z);
if (overlay.power > 0) {
renderVectors(vb, overlay.pos, TEXTURE_OFFSETS[0],
overlay.strongPowered ? TEXTURE_OFFSETS[0] : TEXTURE_OFFSETS[1]);
}
vb.setTranslation(0, 0, 0);
Tessellator.getInstance().draw();
}
PageImage.java 文件源码
项目:uniquecrops
阅读 23
收藏 0
点赞 0
评论 0
@Override
public void draw() {
super.draw();
TextureManager render = mc.renderEngine;
render.bindTexture(resource);
GlStateManager.enableBlend();
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GlStateManager.color(1F, 1F, 1F, 1F);
int k = (gui.width - gui.WIDTH) / 2;
gui.drawTexturedModalRect(k + 5, 5, 0, 0, gui.WIDTH, gui.HEIGHT);
gui.drawCenteredString(mc.fontRendererObj, text, drawX + 60, drawY + 150, Color.gray.getRGB());
GlStateManager.disableBlend();
}
PageTitle.java 文件源码
项目:uniquecrops
阅读 22
收藏 0
点赞 0
评论 0
@Override
public void draw() {
super.draw();
if (this.title != null) {
TextureManager render = mc.renderEngine;
render.bindTexture(resource);
GlStateManager.enableBlend();
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GlStateManager.color(1F, 1F, 1F, 1F);
int k = (gui.width - gui.WIDTH) / 2;
gui.drawTexturedModalRect(k, 5, 0, 0, gui.WIDTH, gui.HEIGHT);
drawSplitStringWithShadow(I18n.format(this.title), drawX + 10, drawY + 140, this.wordWrap, Color.gray.getRGB());
gui.drawCenteredString(mc.fontRendererObj, "-by " + gui.reader.getName(), drawX + 60, drawY + 155, Color.lightGray.getRGB());
GlStateManager.disableBlend();
}
}
ShadersTex.java 文件源码
项目:Backmemed
阅读 24
收藏 0
点赞 0
评论 0
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);
}
}
TileEntityRendererDispatcher.java 文件源码
项目:CustomWorldGen
阅读 25
收藏 0
点赞 0
评论 0
public void prepare(World p_190056_1_, TextureManager p_190056_2_, FontRenderer p_190056_3_, Entity p_190056_4_, RayTraceResult p_190056_5_, float p_190056_6_)
{
if (this.worldObj != p_190056_1_)
{
this.setWorld(p_190056_1_);
}
this.renderEngine = p_190056_2_;
this.entity = p_190056_4_;
this.fontRenderer = p_190056_3_;
this.cameraHitResult = p_190056_5_;
this.entityYaw = p_190056_4_.prevRotationYaw + (p_190056_4_.rotationYaw - p_190056_4_.prevRotationYaw) * p_190056_6_;
this.entityPitch = p_190056_4_.prevRotationPitch + (p_190056_4_.rotationPitch - p_190056_4_.prevRotationPitch) * p_190056_6_;
this.entityX = p_190056_4_.lastTickPosX + (p_190056_4_.posX - p_190056_4_.lastTickPosX) * (double)p_190056_6_;
this.entityY = p_190056_4_.lastTickPosY + (p_190056_4_.posY - p_190056_4_.lastTickPosY) * (double)p_190056_6_;
this.entityZ = p_190056_4_.lastTickPosZ + (p_190056_4_.posZ - p_190056_4_.lastTickPosZ) * (double)p_190056_6_;
}
SkinManager.java 文件源码
项目:Backmemed
阅读 33
收藏 0
点赞 0
评论 0
public SkinManager(TextureManager textureManagerInstance, File skinCacheDirectory, MinecraftSessionService sessionService)
{
this.textureManager = textureManagerInstance;
this.skinCacheDir = skinCacheDirectory;
this.sessionService = sessionService;
this.skinCacheLoader = CacheBuilder.newBuilder().expireAfterAccess(15L, TimeUnit.SECONDS).<GameProfile, Map<Type, MinecraftProfileTexture>>build(new CacheLoader<GameProfile, Map<Type, MinecraftProfileTexture>>()
{
public Map<Type, MinecraftProfileTexture> load(GameProfile p_load_1_) throws Exception
{
try
{
return Minecraft.getMinecraft().getSessionService().getTextures(p_load_1_, false);
}
catch (Throwable var3)
{
return Maps.<Type, MinecraftProfileTexture>newHashMap();
}
}
});
}
RenderItem.java 文件源码
项目:Backmemed
阅读 24
收藏 0
点赞 0
评论 0
public RenderItem(TextureManager p_i46552_1_, ModelManager p_i46552_2_, ItemColors p_i46552_3_)
{
this.textureManager = p_i46552_1_;
this.modelManager = p_i46552_2_;
if (Reflector.ItemModelMesherForge_Constructor.exists())
{
this.itemModelMesher = (ItemModelMesher)Reflector.newInstance(Reflector.ItemModelMesherForge_Constructor, new Object[] {p_i46552_2_});
}
else
{
this.itemModelMesher = new ItemModelMesher(p_i46552_2_);
}
this.registerItems();
this.itemColors = p_i46552_3_;
}
ParticleBubble.java 文件源码
项目:Bewitchment
阅读 24
收藏 0
点赞 0
评论 0
private ParticleBubble(TextureManager textureManagerIn, World world, double x, double y, double z, int rgb) {
super(world, x, y, z, 0, 0, 0);
this.textureManager = textureManagerIn;
this.motionX *= 0.009999999776482582D;
this.motionY = 0.1D * 0.20000000298023224D + (Math.random() * 2.0D - 1.0D) * 0.019999999552965164D;
this.motionZ *= 0.009999999776482582D;
this.particleScale *= 0.025F;
this.particleMaxAge = 2;
rgb = new Color(rgb, false).brighter().brighter().brighter().brighter().hashCode();
float r = (rgb >>> 16 & 0xFF) / 256.0F;
float g = (rgb >>> 8 & 0xFF) / 256.0F;
float b = (rgb & 0xFF) / 256.0F;
setRBGColorF(r, g, b);
}
InterfaceCrusher.java 文件源码
项目:Metalworks
阅读 31
收藏 0
点赞 0
评论 0
@SideOnly(Side.CLIENT)
@Override
public void drawBackground(TileCrusher tile, GuiMachine<TileCrusher> gui, TextureManager texture, int guiLeft, int guiTop, int mouseX, int mouseY, float partialTicks) {
texture.bindTexture(LOC);
gui.drawTexturedModalRect(guiLeft, guiTop, 0, 0, gui.getXSize(), gui.getYSize());
if(tile.maxBurn > 0){
int i = (int) ((tile.burn / (tile.maxBurn * 1.0F)) * 25.0F);
gui.drawTexturedModalRect(guiLeft + 83, guiTop + 25, 0, 74, 30, 25 - i);
}
}
InterfaceDuster.java 文件源码
项目:Metalworks
阅读 24
收藏 0
点赞 0
评论 0
@SideOnly(Side.CLIENT)
@Override
public void drawBackground(TileDuster tile, GuiMachine<TileDuster> gui, TextureManager texture, int guiLeft, int guiTop, int mouseX, int mouseY, float partialTicks) {
texture.bindTexture(LOC);
gui.drawTexturedModalRect(guiLeft, guiTop, 0, 0, gui.getXSize(), gui.getYSize());
if(tile.maxBurn > 0){
int i = (int) ((tile.burn / (tile.maxBurn * 1.0F)) * 25.0F);
gui.drawTexturedModalRect(guiLeft + 73, guiTop + 29, 176, 0, 30, 25 - i);
}
}
InterfaceBlastFurnace.java 文件源码
项目:Metalworks
阅读 26
收藏 0
点赞 0
评论 0
@SideOnly(Side.CLIENT)
@Override
public void drawBackground(TileBlastFurnace tile, GuiMachine<TileBlastFurnace> gui, TextureManager texture, int guiLeft, int guiTop, int mouseX, int mouseY, float partialTicks) {
texture.bindTexture(LOC);
gui.drawTexturedModalRect(guiLeft, guiTop, 0, 0, gui.getXSize(), gui.getYSize());
if(tile.maxBurn > 0){
int i = (int) ((tile.burnLeft / (tile.maxBurn * 1.0F)) * 26);
gui.drawTexturedModalRect(guiLeft + 68, guiTop + 29, 180, 0, 43, 26 - i);
}
}
EntityLargeExplodeFX.java 文件源码
项目:DecompiledMinecraft
阅读 24
收藏 0
点赞 0
评论 0
protected EntityLargeExplodeFX(TextureManager renderEngine, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double p_i1213_9_, double p_i1213_11_, double p_i1213_13_)
{
super(worldIn, xCoordIn, yCoordIn, zCoordIn, 0.0D, 0.0D, 0.0D);
this.theRenderEngine = renderEngine;
this.field_70584_aq = 6 + this.rand.nextInt(4);
this.particleRed = this.particleGreen = this.particleBlue = this.rand.nextFloat() * 0.6F + 0.4F;
this.field_70582_as = 1.0F - (float)p_i1213_9_ * 0.5F;
}
EntityFootStepFX.java 文件源码
项目:DecompiledMinecraft
阅读 22
收藏 0
点赞 0
评论 0
protected EntityFootStepFX(TextureManager currentFootStepsIn, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn)
{
super(worldIn, xCoordIn, yCoordIn, zCoordIn, 0.0D, 0.0D, 0.0D);
this.currentFootSteps = currentFootStepsIn;
this.motionX = this.motionY = this.motionZ = 0.0D;
this.footstepMaxAge = 200;
}
ShaderGroup.java 文件源码
项目:DecompiledMinecraft
阅读 22
收藏 0
点赞 0
评论 0
public ShaderGroup(TextureManager p_i1050_1_, IResourceManager p_i1050_2_, Framebuffer p_i1050_3_, ResourceLocation p_i1050_4_) throws JsonException, IOException, JsonSyntaxException
{
this.resourceManager = p_i1050_2_;
this.mainFramebuffer = p_i1050_3_;
this.field_148036_j = 0.0F;
this.field_148037_k = 0.0F;
this.mainFramebufferWidth = p_i1050_3_.framebufferWidth;
this.mainFramebufferHeight = p_i1050_3_.framebufferHeight;
this.shaderGroupName = p_i1050_4_.toString();
this.resetProjectionMatrix();
this.parseGroup(p_i1050_1_, p_i1050_4_);
}
SkinManager.java 文件源码
项目:DecompiledMinecraft
阅读 27
收藏 0
点赞 0
评论 0
public SkinManager(TextureManager textureManagerInstance, File skinCacheDirectory, MinecraftSessionService sessionService)
{
this.textureManager = textureManagerInstance;
this.skinCacheDir = skinCacheDirectory;
this.sessionService = sessionService;
this.skinCacheLoader = CacheBuilder.newBuilder().expireAfterAccess(15L, TimeUnit.SECONDS).<GameProfile, Map<Type, MinecraftProfileTexture>>build(new CacheLoader<GameProfile, Map<Type, MinecraftProfileTexture>>()
{
public Map<Type, MinecraftProfileTexture> load(GameProfile p_load_1_) throws Exception
{
return Minecraft.getMinecraft().getSessionService().getTextures(p_load_1_, false);
}
});
}
ResourcePackRepository.java 文件源码
项目:DecompiledMinecraft
阅读 23
收藏 0
点赞 0
评论 0
public void bindTexturePackIcon(TextureManager textureManagerIn)
{
if (this.locationTexturePackIcon == null)
{
this.locationTexturePackIcon = textureManagerIn.getDynamicTextureLocation("texturepackicon", new DynamicTexture(this.texturePackIcon));
}
textureManagerIn.bindTexture(this.locationTexturePackIcon);
}
TileEntitySpecialRenderer.java 文件源码
项目:DecompiledMinecraft
阅读 28
收藏 0
点赞 0
评论 0
protected void bindTexture(ResourceLocation location)
{
TextureManager texturemanager = this.rendererDispatcher.renderEngine;
if (texturemanager != null)
{
texturemanager.bindTexture(location);
}
}