本文整理汇总了Java中net.minecraft.client.renderer.GlStateManager.enableRescaleNormal方法的典型用法代码示例。如果您正苦于以下问题:Java GlStateManager.enableRescaleNormal方法的具体用法?Java GlStateManager.enableRescaleNormal怎么用?Java GlStateManager.enableRescaleNormal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.renderer.GlStateManager
的用法示例。
在下文中一共展示了GlStateManager.enableRescaleNormal方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doRenderLayer
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void doRenderLayer(EntityEnderman entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
IBlockState iblockstate = entitylivingbaseIn.getHeldBlockState();
if (iblockstate != null)
{
BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
GlStateManager.enableRescaleNormal();
GlStateManager.pushMatrix();
GlStateManager.translate(0.0F, 0.6875F, -0.75F);
GlStateManager.rotate(20.0F, 1.0F, 0.0F, 0.0F);
GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
GlStateManager.translate(0.25F, 0.1875F, 0.25F);
float f = 0.5F;
GlStateManager.scale(-0.5F, -0.5F, 0.5F);
int i = entitylivingbaseIn.getBrightnessForRender(partialTicks);
int j = i % 65536;
int k = i / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j, (float)k);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.endermanRenderer.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
blockrendererdispatcher.renderBlockBrightness(iblockstate, 1.0F);
GlStateManager.popMatrix();
GlStateManager.disableRescaleNormal();
}
}
示例2: doRender
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
/**
* Renders the desired {@code T} type Entity.
*/
public void doRender(EntityShulkerBullet entity, double x, double y, double z, float entityYaw, float partialTicks)
{
GlStateManager.pushMatrix();
float f = this.rotLerp(entity.prevRotationYaw, entity.rotationYaw, partialTicks);
float f1 = entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * partialTicks;
float f2 = (float)entity.ticksExisted + partialTicks;
GlStateManager.translate((float)x, (float)y + 0.15F, (float)z);
GlStateManager.rotate(MathHelper.sin(f2 * 0.1F) * 180.0F, 0.0F, 1.0F, 0.0F);
GlStateManager.rotate(MathHelper.cos(f2 * 0.1F) * 180.0F, 1.0F, 0.0F, 0.0F);
GlStateManager.rotate(MathHelper.sin(f2 * 0.15F) * 360.0F, 0.0F, 0.0F, 1.0F);
float f3 = 0.03125F;
GlStateManager.enableRescaleNormal();
GlStateManager.scale(-1.0F, -1.0F, 1.0F);
this.bindEntityTexture(entity);
this.model.render(entity, 0.0F, 0.0F, 0.0F, f, f1, 0.03125F);
GlStateManager.enableBlend();
GlStateManager.color(1.0F, 1.0F, 1.0F, 0.5F);
GlStateManager.scale(1.5F, 1.5F, 1.5F);
this.model.render(entity, 0.0F, 0.0F, 0.0F, f, f1, 0.03125F);
GlStateManager.disableBlend();
GlStateManager.popMatrix();
super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
示例3: renderItemInWorld
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
@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();
}
}
示例4: doRenderLayer
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void doRenderLayer(EntityIronGolem entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
if (entitylivingbaseIn.getHoldRoseTick() != 0)
{
BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
GlStateManager.enableRescaleNormal();
GlStateManager.pushMatrix();
GlStateManager.rotate(5.0F + 180.0F * ((ModelIronGolem)this.ironGolemRenderer.getMainModel()).ironGolemRightArm.rotateAngleX / (float)Math.PI, 1.0F, 0.0F, 0.0F);
GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
GlStateManager.translate(-0.9375F, -0.625F, -0.9375F);
float f = 0.5F;
GlStateManager.scale(0.5F, -0.5F, 0.5F);
int i = entitylivingbaseIn.getBrightnessForRender(partialTicks);
int j = i % 65536;
int k = i / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j, (float)k);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.ironGolemRenderer.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
blockrendererdispatcher.renderBlockBrightness(Blocks.RED_FLOWER.getDefaultState(), 1.0F);
GlStateManager.popMatrix();
GlStateManager.disableRescaleNormal();
}
}
示例5: renderItemModelTransform
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
protected void renderItemModelTransform(ItemStack stack, IBakedModel model, ItemCameraTransforms.TransformType cameraTransformType)
{
this.textureManager.bindTexture(TextureMap.locationBlocksTexture);
this.textureManager.getTexture(TextureMap.locationBlocksTexture).setBlurMipmap(false, false);
this.preTransform(stack);
GlStateManager.enableRescaleNormal();
GlStateManager.alphaFunc(516, 0.1F);
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
GlStateManager.pushMatrix();
ItemCameraTransforms itemcameratransforms = model.getItemCameraTransforms();
itemcameratransforms.applyTransform(cameraTransformType);
if (this.func_183005_a(itemcameratransforms.getTransform(cameraTransformType)))
{
GlStateManager.cullFace(1028);
}
this.renderItem(stack, model);
GlStateManager.cullFace(1029);
GlStateManager.popMatrix();
GlStateManager.disableRescaleNormal();
GlStateManager.disableBlend();
this.textureManager.bindTexture(TextureMap.locationBlocksTexture);
this.textureManager.getTexture(TextureMap.locationBlocksTexture).restoreLastBlurMipmap();
}
示例6: renderIcon
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
private void renderIcon(int p_178054_1_, int p_178054_2_, Item icon, int iconMetadata)
{
this.blitSlotBg(p_178054_1_ + 1, p_178054_2_ + 1);
GlStateManager.enableRescaleNormal();
RenderHelper.enableGUIStandardItemLighting();
GuiFlatPresets.this.itemRender.renderItemIntoGUI(new ItemStack(icon, 1, iconMetadata), p_178054_1_ + 2, p_178054_2_ + 2);
RenderHelper.disableStandardItemLighting();
GlStateManager.disableRescaleNormal();
}
示例7: drawStatsScreen
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
private void drawStatsScreen(int p_146521_1_, int p_146521_2_, Item p_146521_3_)
{
this.drawButtonBackground(p_146521_1_ + 1, p_146521_2_ + 1);
GlStateManager.enableRescaleNormal();
RenderHelper.enableGUIStandardItemLighting();
this.itemRender.renderItemIntoGUI(new ItemStack(p_146521_3_, 1, 0), p_146521_1_ + 2, p_146521_2_ + 2);
RenderHelper.disableStandardItemLighting();
GlStateManager.disableRescaleNormal();
}
示例8: func_178054_a
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
private void func_178054_a(int p_178054_1_, int p_178054_2_, Item p_178054_3_, int p_178054_4_)
{
this.func_148173_e(p_178054_1_ + 1, p_178054_2_ + 1);
GlStateManager.enableRescaleNormal();
RenderHelper.enableGUIStandardItemLighting();
GuiFlatPresets.this.itemRender.renderItemIntoGUI(new ItemStack(p_178054_3_, 1, p_178054_4_), p_178054_1_ + 2, p_178054_2_ + 2);
RenderHelper.disableStandardItemLighting();
GlStateManager.disableRescaleNormal();
}
示例9: doRender
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity>) and this method has signature public void doRender(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doe
*/
public void doRender(EntityFireball entity, double x, double y, double z, float entityYaw, float partialTicks)
{
GlStateManager.pushMatrix();
this.bindEntityTexture(entity);
GlStateManager.translate((float)x, (float)y, (float)z);
GlStateManager.enableRescaleNormal();
GlStateManager.scale(this.scale, this.scale, this.scale);
TextureAtlasSprite textureatlassprite = Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getParticleIcon(Items.fire_charge);
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
float f = textureatlassprite.getMinU();
float f1 = textureatlassprite.getMaxU();
float f2 = textureatlassprite.getMinV();
float f3 = textureatlassprite.getMaxV();
float f4 = 1.0F;
float f5 = 0.5F;
float f6 = 0.25F;
GlStateManager.rotate(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
GlStateManager.rotate(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_NORMAL);
worldrenderer.pos(-0.5D, -0.25D, 0.0D).tex((double)f, (double)f3).normal(0.0F, 1.0F, 0.0F).endVertex();
worldrenderer.pos(0.5D, -0.25D, 0.0D).tex((double)f1, (double)f3).normal(0.0F, 1.0F, 0.0F).endVertex();
worldrenderer.pos(0.5D, 0.75D, 0.0D).tex((double)f1, (double)f2).normal(0.0F, 1.0F, 0.0F).endVertex();
worldrenderer.pos(-0.5D, 0.75D, 0.0D).tex((double)f, (double)f2).normal(0.0F, 1.0F, 0.0F).endVertex();
tessellator.draw();
GlStateManager.disableRescaleNormal();
GlStateManager.popMatrix();
super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
示例10: doRender
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
/**
* Renders the desired {@code T} type Entity.
*/
public void doRender(EntityDragonFireball entity, double x, double y, double z, float entityYaw, float partialTicks)
{
GlStateManager.pushMatrix();
this.bindEntityTexture(entity);
GlStateManager.translate((float)x, (float)y, (float)z);
GlStateManager.enableRescaleNormal();
GlStateManager.scale(2.0F, 2.0F, 2.0F);
Tessellator tessellator = Tessellator.getInstance();
VertexBuffer vertexbuffer = tessellator.getBuffer();
float f = 1.0F;
float f1 = 0.5F;
float f2 = 0.25F;
GlStateManager.rotate(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
GlStateManager.rotate((float)(this.renderManager.options.thirdPersonView == 2 ? -1 : 1) * -this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
if (this.renderOutlines)
{
GlStateManager.enableColorMaterial();
GlStateManager.enableOutlineMode(this.getTeamColor(entity));
}
vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX_NORMAL);
vertexbuffer.pos(-0.5D, -0.25D, 0.0D).tex(0.0D, 1.0D).normal(0.0F, 1.0F, 0.0F).endVertex();
vertexbuffer.pos(0.5D, -0.25D, 0.0D).tex(1.0D, 1.0D).normal(0.0F, 1.0F, 0.0F).endVertex();
vertexbuffer.pos(0.5D, 0.75D, 0.0D).tex(1.0D, 0.0D).normal(0.0F, 1.0F, 0.0F).endVertex();
vertexbuffer.pos(-0.5D, 0.75D, 0.0D).tex(0.0D, 0.0D).normal(0.0F, 1.0F, 0.0F).endVertex();
tessellator.draw();
if (this.renderOutlines)
{
GlStateManager.disableOutlineMode();
GlStateManager.disableColorMaterial();
}
GlStateManager.disableRescaleNormal();
GlStateManager.popMatrix();
super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
示例11: drawItem
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public static void drawItem(ItemStack item, double x, double y) {
GlStateManager.pushMatrix();
RenderHelper.enableGUIStandardItemLighting();
GlStateManager.disableLighting();
GlStateManager.enableRescaleNormal();
GlStateManager.enableColorMaterial();
GlStateManager.enableLighting();
MC.getRenderItem().zLevel = 100.f;
renderItemAndEffectIntoGUI(getLocalPlayer(), item, x, y, 16.D);
MC.getRenderItem().zLevel = 0.f;
GlStateManager.popMatrix();
GlStateManager.disableLighting();
GlStateManager.enableDepth();
GlStateManager.color(1.f, 1.f, 1.f, 1.f);
}
示例12: doRender
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
/**
* Renders the desired {@code T} type Entity.
*/
public void doRender(EntityLeashKnot entity, double x, double y, double z, float entityYaw, float partialTicks)
{
GlStateManager.pushMatrix();
GlStateManager.disableCull();
GlStateManager.translate((float)x, (float)y, (float)z);
float f = 0.0625F;
GlStateManager.enableRescaleNormal();
GlStateManager.scale(-1.0F, -1.0F, 1.0F);
GlStateManager.enableAlpha();
this.bindEntityTexture(entity);
if (this.renderOutlines)
{
GlStateManager.enableColorMaterial();
GlStateManager.enableOutlineMode(this.getTeamColor(entity));
}
this.leashKnotModel.render(entity, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
if (this.renderOutlines)
{
GlStateManager.disableOutlineMode();
GlStateManager.disableColorMaterial();
}
GlStateManager.popMatrix();
super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
示例13: doRender
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity>) and this method has signature public void doRender(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doe
*/
public void doRender(T entity, double x, double y, double z, float entityYaw, float partialTicks)
{
GlStateManager.pushMatrix();
GlStateManager.translate((float)x, (float)y, (float)z);
GlStateManager.enableRescaleNormal();
GlStateManager.scale(0.5F, 0.5F, 0.5F);
GlStateManager.rotate(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
GlStateManager.rotate(this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
this.bindTexture(TextureMap.locationBlocksTexture);
this.field_177083_e.func_181564_a(this.func_177082_d(entity), ItemCameraTransforms.TransformType.GROUND);
GlStateManager.disableRescaleNormal();
GlStateManager.popMatrix();
super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
示例14: doRender
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity>) and this method has signature public void doRender(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doe
*/
public void doRender(EntityLeashKnot entity, double x, double y, double z, float entityYaw, float partialTicks)
{
GlStateManager.pushMatrix();
GlStateManager.disableCull();
GlStateManager.translate((float)x, (float)y, (float)z);
float f = 0.0625F;
GlStateManager.enableRescaleNormal();
GlStateManager.scale(-1.0F, -1.0F, 1.0F);
GlStateManager.enableAlpha();
this.bindEntityTexture(entity);
this.leashKnotModel.render(entity, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, f);
GlStateManager.popMatrix();
super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
示例15: renderHotbar
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
private static void renderHotbar(float partialTicks, ScaledResolution sRes)
{
if (Minecraft.getMinecraft().getRenderViewEntity() instanceof EntityPlayer)
{
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
EntityPlayer entityplayer = (EntityPlayer)Minecraft.getMinecraft().getRenderViewEntity();
ItemStack itemstack = entityplayer.getHeldItemOffhand();
EnumHandSide enumhandside = entityplayer.getPrimaryHand().opposite();
int i = sRes.getScaledWidth() / 2;
GlStateManager.enableRescaleNormal();
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
RenderHelper.enableGUIStandardItemLighting();
for (int l = 0; l < 9; ++l)
{
int i1 = i - 90 + l * 20 + 3;
int j1 = sRes.getScaledHeight() - 16 - 9;
renderHotbarItem(i1, j1, partialTicks, entityplayer, entityplayer.inventory.mainInventory.get(l));
}
if (!itemstack.isEmpty())
{
int l1 = sRes.getScaledHeight() - 16 - 3;
if (enumhandside == EnumHandSide.LEFT)
{
renderHotbarItem(i - 102 - 26, l1 - 8, partialTicks, entityplayer, itemstack);
}
else
{
renderHotbarItem(i + 102 + 10, l1 - 8, partialTicks, entityplayer, itemstack);
}
}
if (Minecraft.getMinecraft().gameSettings.attackIndicator == 2)
{
float f1 = Minecraft.getMinecraft().player.getCooledAttackStrength(0.0F);
if (f1 < 1.0F)
{
Minecraft.getMinecraft().getTextureManager().bindTexture(Gui.ICONS);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
}
}
RenderHelper.disableStandardItemLighting();
GlStateManager.disableRescaleNormal();
GlStateManager.disableBlend();
}
}