protected void bindTexture(ResourceLocation location)
{
TextureManager texturemanager = this.rendererDispatcher.renderEngine;
if (texturemanager != null)
{
texturemanager.bindTexture(location);
}
}
java类net.minecraft.client.renderer.texture.TextureManager的实例源码
TileEntitySpecialRenderer.java 文件源码
项目:CustomWorldGen
阅读 22
收藏 0
点赞 0
评论 0
ShadersTex.java 文件源码
项目:BaseClient
阅读 23
收藏 0
点赞 0
评论 0
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());
}
PlayerItemModel.java 文件源码
项目:BaseClient
阅读 19
收藏 0
点赞 0
评论 0
public void render(ModelBiped p_render_1_, AbstractClientPlayer p_render_2_, float p_render_3_, float p_render_4_)
{
TextureManager texturemanager = Config.getTextureManager();
if (this.usePlayerTexture)
{
texturemanager.bindTexture(p_render_2_.getLocationSkin());
}
else if (this.textureLocation != null)
{
if (this.texture == null && this.textureImage != null)
{
this.texture = new DynamicTexture(this.textureImage);
Minecraft.getMinecraft().getTextureManager().loadTexture(this.textureLocation, this.texture);
}
texturemanager.bindTexture(this.textureLocation);
}
else
{
texturemanager.bindTexture(this.locationMissing);
}
for (int i = 0; i < this.modelRenderers.length; ++i)
{
PlayerItemRenderer playeritemrenderer = this.modelRenderers[i];
GlStateManager.pushMatrix();
if (p_render_2_.isSneaking())
{
GlStateManager.translate(0.0F, 0.2F, 0.0F);
}
playeritemrenderer.render(p_render_1_, p_render_3_);
GlStateManager.popMatrix();
}
}
CustomSky.java 文件源码
项目:BaseClient
阅读 21
收藏 0
点赞 0
评论 0
public static void renderSky(World p_renderSky_0_, TextureManager p_renderSky_1_, float p_renderSky_2_, float p_renderSky_3_)
{
if (worldSkyLayers != null)
{
if (Config.getGameSettings().renderDistanceChunks >= 8)
{
int i = p_renderSky_0_.provider.getDimensionId();
if (i >= 0 && i < worldSkyLayers.length)
{
CustomSkyLayer[] acustomskylayer = worldSkyLayers[i];
if (acustomskylayer != null)
{
long j = p_renderSky_0_.getWorldTime();
int k = (int)(j % 24000L);
for (int l = 0; l < acustomskylayer.length; ++l)
{
CustomSkyLayer customskylayer = acustomskylayer[l];
if (customskylayer.isActive(p_renderSky_0_, k))
{
customskylayer.render(k, p_renderSky_2_, p_renderSky_3_);
}
}
Blender.clearBlend(p_renderSky_3_);
}
}
}
}
}
ParticleFootStep.java 文件源码
项目:CustomWorldGen
阅读 23
收藏 0
点赞 0
评论 0
protected ParticleFootStep(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 = 0.0D;
this.motionY = 0.0D;
this.motionZ = 0.0D;
this.footstepMaxAge = 200;
}
RenderItem.java 文件源码
项目:CustomWorldGen
阅读 27
收藏 0
点赞 0
评论 0
public RenderItem(TextureManager p_i46552_1_, ModelManager p_i46552_2_, ItemColors p_i46552_3_)
{
this.textureManager = p_i46552_1_;
this.itemModelMesher = new net.minecraftforge.client.ItemModelMesherForge(p_i46552_2_);
this.registerItems();
this.itemColors = p_i46552_3_;
}
EntityFootStepFX.java 文件源码
项目:BaseClient
阅读 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 文件源码
项目:BaseClient
阅读 21
收藏 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 文件源码
项目:BaseClient
阅读 21
收藏 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 文件源码
项目:BaseClient
阅读 19
收藏 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);
}