本文整理匯總了Java中net.minecraft.client.renderer.GlStateManager.enableBlend方法的典型用法代碼示例。如果您正苦於以下問題:Java GlStateManager.enableBlend方法的具體用法?Java GlStateManager.enableBlend怎麽用?Java GlStateManager.enableBlend使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.client.renderer.GlStateManager
的用法示例。
在下文中一共展示了GlStateManager.enableBlend方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: renderItem
import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
@Override
public void renderItem(@Nonnull ItemStack stack, TransformType transformType) {
if (Block.getBlockFromItem(stack.getItem()) == ModBlocks.DANKNULL_DOCK) {
GuiUtils.bindTexture(DankTextures.DOCK_TEXTURE);
GlStateManager.enableLighting();
GlStateManager.rotate(180, 0, 0, 180);
GlStateManager.translate(-0.5, -1.5, 0.5);
MODEL.render(0.0625F);
GlStateManager.translate(0.5, 1.5, -0.5);
GlStateManager.disableLighting();
GlStateManager.disableDepth();
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
renderDankNull(stack);
}
}
示例2: render
import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public void render(float p_190060_1_, long p_190060_2_)
{
this.field_191313_b = this.field_191312_a.player;
this.field_191314_c = this.field_191313_b.lastTickPosX + (this.field_191313_b.posX - this.field_191313_b.lastTickPosX) * (double)p_190060_1_;
this.field_191315_d = this.field_191313_b.lastTickPosY + (this.field_191313_b.posY - this.field_191313_b.lastTickPosY) * (double)p_190060_1_;
this.field_191316_e = this.field_191313_b.lastTickPosZ + (this.field_191313_b.posZ - this.field_191313_b.lastTickPosZ) * (double)p_190060_1_;
World world = this.field_191312_a.player.world;
List<AxisAlignedBB> list = world.getCollisionBoxes(this.field_191313_b, this.field_191313_b.getEntityBoundingBox().expand(4.0D, 4.0D, 4.0D));
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
GlStateManager.glLineWidth(2.0F);
GlStateManager.disableTexture2D();
GlStateManager.depthMask(false);
for (AxisAlignedBB axisalignedbb : list)
{
RenderGlobal.drawSelectionBoundingBox(axisalignedbb.expandXyz(0.002D).offset(-this.field_191314_c, -this.field_191315_d, -this.field_191316_e), 1.0F, 1.0F, 1.0F, 1.0F);
}
GlStateManager.depthMask(true);
GlStateManager.enableTexture2D();
GlStateManager.disableBlend();
}
示例3: renderModel
import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
private void renderModel(float tick, double x, double y, double z) {
GlStateManager.pushMatrix();
GlStateManager.disableCull();
GlStateManager.disableLighting();
GlStateManager.enableBlend();
GLHelper.BLEND_SRC_ALPHA$ONE.blend();
float brigthness = MathHelper.cos(Minecraft.getMinecraft().player.ticksExisted * 0.05F);
if(brigthness < 0) brigthness *= -1;
brigthness *= 255F;
GLHelper.lightMap(brigthness, brigthness);
GlStateManager.translate(x, y, z + 0.5F);
SpriteLibrary.QUANTUM_MIRROR.bindManager();
renderMirror(tick, -180F, 0.5F);
renderMirror(-tick, 90F, 0.75F);
renderMirror(tick, 0F, 1F);
GlStateManager.disableBlend();
GlStateManager.enableLighting();
GlStateManager.enableCull();
GlStateManager.popMatrix();
}
示例4: renderItemWithTransform
import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public static void renderItemWithTransform(World world, ItemStack stack,
ItemCameraTransforms.TransformType transform)
{
GlStateManager.pushMatrix();
GlStateManager.pushAttrib();
GlStateManager.enableCull();
GlStateManager.depthMask(true);
RenderHelper.enableStandardItemLighting();
GlStateManager.enableAlpha();
GlStateManager.enableRescaleNormal();
GlStateManager.alphaFunc(516, 0.1F);
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA,
GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE,
GlStateManager.DestFactor.ZERO);
IBakedModel ibakedmodel = Minecraft.getMinecraft().getRenderItem().getItemModelWithOverrides(stack, world,
(EntityLivingBase) null);
IBakedModel transformedModel = net.minecraftforge.client.ForgeHooksClient.handleCameraTransforms(ibakedmodel,
transform, false);
Minecraft.getMinecraft().getRenderItem().renderItem(stack, transformedModel);
GlStateManager.disableBlend();
GlStateManager.disableAlpha();
RenderHelper.disableStandardItemLighting();
GlStateManager.depthMask(false);
GlStateManager.disableCull();
GlStateManager.popAttrib();
GlStateManager.popMatrix();
}
示例5: drawGuiContainerForegroundLayer
import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
@Override
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
//String s = this.entity.getDisplayName().getUnformattedText();
//this.fontRendererObj.drawString(s, 88 - this.fontRendererObj.getStringWidth(s) / 2, 6, 4210752); //#404040
//this.fontRendererObj.drawString(this.playerInv.getDisplayName().getUnformattedText(), 8, 72, 4210752); //#404040
int rfBarX = 226;
int rfBarY = 20;
int rfBarHeight = 88;
int rfBarWidth = 14;
int usedHeight = rfBarHeight - (int)(this.entity.getEnergyStored(EnumFacing.DOWN) / (double)this.entity.getMaxEnergyStored(EnumFacing.DOWN) * rfBarHeight);
Gui.drawRect(rfBarX, rfBarY, rfBarX + rfBarWidth, rfBarY + usedHeight, 0xFF000000);
// Draw operation details
Operation<BundlerEntity> op = this.entity.getCurrentOperation();
String statusStr;
if (op != null) {
int width = (int)(32 * op.getPercentage() / (double)100);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(new ResourceLocation("rezolve:textures/gui/container/arrow.png"));
GlStateManager.enableBlend();
this.drawModalRectWithCustomSizedTexture(103, 81, 0, 0, width, 32, 32, 32);
statusStr = "Operation: "+op.getPercentage()+"%";
} else {
statusStr = "Idle.";
}
this.fontRendererObj.drawString(statusStr, 7, 112, 0xFF000000);
}
示例6: renderMinigunFirstPerson
import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
private void renderMinigunFirstPerson() {
EntityPlayer player = Minecraft.getMinecraft().player;
ItemStack stack = player.getHeldItemMainhand();
if (stack.getItem() == Itemss.MINIGUN) {
Minigun minigun = ((ItemMinigun) Itemss.MINIGUN).getMinigun(stack, player);
if (minigun.isMinigunActivated() && minigun.getMinigunSpeed() == Minigun.MAX_GUN_SPEED) {
GlStateManager.disableTexture2D();
GlStateManager.disableLighting();
GlStateManager.enableBlend();
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
RenderUtils.glColorHex(0x40000000 | minigun.getAmmoColor());
for (int i = 0; i < 5; i++) {
Vec3d directionVec = player.getLookVec().normalize();
Vec3d vec2 = new Vec3d(directionVec.x, directionVec.y, directionVec.z);
vec2 = vec2.rotateYaw(-(float)Math.PI / 2f);
minigunFire.startX = vec2.x ;
minigunFire.startY = 1.0;
minigunFire.startZ = vec2.z;
minigunFire.endX = directionVec.x * 20 + player.getRNG().nextDouble() - 0.5;
minigunFire.endY = directionVec.y * 20 + player.getEyeHeight() + player.getRNG().nextDouble() - 0.5;
minigunFire.endZ = directionVec.z * 20 + player.getRNG().nextDouble() - 0.5;
minigunFire.render();
}
GlStateManager.color(1, 1, 1, 1);
GlStateManager.enableLighting();
GlStateManager.enableTexture2D();
GlStateManager.disableBlend();
}
}
}
示例7: onRender
import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
@Override
public void onRender()
{
GlStateManager.pushMatrix();
GlStateManager.translate(getWidth() / 2, getHeight() / 2, 0);
GlStateManager.rotate(degrees, 0, 0, 1);
GlStateManager.translate(-(getWidth() / 2), -(getHeight() / 2), 0);
GlStateManager.enableBlend();
GlStateManager.depthMask(false);
GlStateManager.color(color.getRed() / 255f, color.getGreen() / 255f, color.getBlue() / 255f, alpha);
DrawingTools.drawTexture(TEXTURE, 0, 0, (int) getWidth(), (int) getHeight());
GlStateManager.depthMask(true);
GlStateManager.disableBlend();
GlStateManager.popMatrix();
}
示例8: renderModel
import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
/**
* Renders the model in RenderLiving
*/
protected void renderModel(T entitylivingbaseIn, float p_77036_2_, float p_77036_3_, float p_77036_4_, float p_77036_5_, float p_77036_6_, float p_77036_7_)
{
boolean flag = !entitylivingbaseIn.isInvisible();
boolean flag1 = !flag && !entitylivingbaseIn.isInvisibleToPlayer(Minecraft.getMinecraft().thePlayer);
if (flag || flag1)
{
if (!this.bindEntityTexture(entitylivingbaseIn))
{
return;
}
if (flag1)
{
GlStateManager.pushMatrix();
GlStateManager.color(1.0F, 1.0F, 1.0F, 0.15F);
GlStateManager.depthMask(false);
GlStateManager.enableBlend();
GlStateManager.blendFunc(770, 771);
GlStateManager.alphaFunc(516, 0.003921569F);
}
this.mainModel.render(entitylivingbaseIn, p_77036_2_, p_77036_3_, p_77036_4_, p_77036_5_, p_77036_6_, p_77036_7_);
if (flag1)
{
GlStateManager.disableBlend();
GlStateManager.alphaFunc(516, 0.1F);
GlStateManager.popMatrix();
GlStateManager.depthMask(true);
}
}
}
示例9: doRenderLayer
import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public void doRenderLayer(EntityDragon entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
this.dragonRenderer.bindTexture(TEXTURE);
GlStateManager.enableBlend();
GlStateManager.disableAlpha();
GlStateManager.blendFunc(GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE);
GlStateManager.disableLighting();
GlStateManager.depthFunc(514);
int i = 61680;
int j = 61680;
int k = 0;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 61680.0F, 0.0F);
GlStateManager.enableLighting();
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getMinecraft().entityRenderer.func_191514_d(true);
if (Config.isShaders())
{
Shaders.beginSpiderEyes();
}
Config.getRenderGlobal().renderOverlayEyes = true;
this.dragonRenderer.getMainModel().render(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
Config.getRenderGlobal().renderOverlayEyes = false;
Minecraft.getMinecraft().entityRenderer.func_191514_d(false);
this.dragonRenderer.setLightmap(entitylivingbaseIn, partialTicks);
GlStateManager.disableBlend();
GlStateManager.enableAlpha();
GlStateManager.depthFunc(515);
}
示例10: drawGeneratorProgress
import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public void drawGeneratorProgress(int x, int y, GeneratorBase tile) {
GlStateManager.pushMatrix();
GlStateManager.pushAttrib();
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
int barHeight = (int) (((float) tile.generationTimer / tile.generationTimerDefault) * 16);
drawTexturedModalRect(x, y + barHeight, 176, barHeight, 16, barHeight + 16);
GlStateManager.popAttrib();
GlStateManager.popMatrix();
}
示例11: doRenderLayer
import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public void doRenderLayer(EntityWither entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
if (entitylivingbaseIn.isArmored())
{
GlStateManager.depthMask(!entitylivingbaseIn.isInvisible());
this.witherRenderer.bindTexture(WITHER_ARMOR);
GlStateManager.matrixMode(5890);
GlStateManager.loadIdentity();
float f = (float)entitylivingbaseIn.ticksExisted + partialTicks;
float f1 = MathHelper.cos(f * 0.02F) * 3.0F;
float f2 = f * 0.01F;
GlStateManager.translate(f1, f2, 0.0F);
GlStateManager.matrixMode(5888);
GlStateManager.enableBlend();
float f3 = 0.5F;
GlStateManager.color(f3, f3, f3, 1.0F);
GlStateManager.disableLighting();
GlStateManager.blendFunc(1, 1);
this.witherModel.setLivingAnimations(entitylivingbaseIn, p_177141_2_, p_177141_3_, partialTicks);
this.witherModel.setModelAttributes(this.witherRenderer.getMainModel());
this.witherModel.render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
GlStateManager.matrixMode(5890);
GlStateManager.loadIdentity();
GlStateManager.matrixMode(5888);
GlStateManager.enableLighting();
GlStateManager.disableBlend();
}
}
示例12: doRenderLayer
import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public void doRenderLayer(EntityCreeper entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
if (entitylivingbaseIn.getPowered())
{
boolean flag = entitylivingbaseIn.isInvisible();
GlStateManager.depthMask(!flag);
this.creeperRenderer.bindTexture(LIGHTNING_TEXTURE);
GlStateManager.matrixMode(5890);
GlStateManager.loadIdentity();
float f = (float)entitylivingbaseIn.ticksExisted + partialTicks;
GlStateManager.translate(f * 0.01F, f * 0.01F, 0.0F);
GlStateManager.matrixMode(5888);
GlStateManager.enableBlend();
float f1 = 0.5F;
GlStateManager.color(f1, f1, f1, 1.0F);
GlStateManager.disableLighting();
GlStateManager.blendFunc(1, 1);
this.creeperModel.setModelAttributes(this.creeperRenderer.getMainModel());
this.creeperModel.render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
GlStateManager.matrixMode(5890);
GlStateManager.loadIdentity();
GlStateManager.matrixMode(5888);
GlStateManager.enableLighting();
GlStateManager.disableBlend();
GlStateManager.depthMask(flag);
}
}
示例13: drawPanorama
import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
private void drawPanorama(int p_73970_1_, int p_73970_2_, float p_73970_3_) {
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
GlStateManager.matrixMode(5889);
GlStateManager.pushMatrix();
GlStateManager.loadIdentity();
Project.gluPerspective(120.0F, 1.0F, 0.05F, 10.0F);
GlStateManager.matrixMode(5888);
GlStateManager.pushMatrix();
GlStateManager.loadIdentity();
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.rotate(180.0F, 1.0F, 0.0F, 0.0F);
GlStateManager.rotate(90.0F, 0.0F, 0.0F, 1.0F);
GlStateManager.enableBlend();
GlStateManager.disableAlpha();
GlStateManager.disableCull();
GlStateManager.depthMask(false);
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
int i = 8;
for (int j = 0; j < i * i; ++j) {
GlStateManager.pushMatrix();
float f = ((float) (j % i) / (float) i - 0.5F) / 64.0F;
float f1 = ((float) (j / i) / (float) i - 0.5F) / 64.0F;
float f2 = 0.0F;
GlStateManager.translate(f, f1, f2);
GlStateManager.rotate(MathHelper.sin(((float) this.panoramaTimer + p_73970_3_) / 400.0F) * 25.0F + 20.0F,
1.0F, 0.0F, 0.0F);
GlStateManager.rotate(-((float) this.panoramaTimer + p_73970_3_) * 0.1F, 0.0F, 1.0F, 0.0F);
for (int k = 0; k < 6; ++k) {
GlStateManager.pushMatrix();
if (k == 1) {
GlStateManager.rotate(90.0F, 0.0F, 1.0F, 0.0F);
}
if (k == 2) {
GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F);
}
if (k == 3) {
GlStateManager.rotate(-90.0F, 0.0F, 1.0F, 0.0F);
}
if (k == 4) {
GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
}
if (k == 5) {
GlStateManager.rotate(-90.0F, 1.0F, 0.0F, 0.0F);
}
this.mc.getTextureManager().bindTexture(titlePanoramaPaths[k]);
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
int l = 255 / (j + 1);
float f3 = 0.0F;
worldrenderer.pos(-1.0D, -1.0D, 1.0D).tex(0.0D, 0.0D).color(255, 255, 255, l).endVertex();
worldrenderer.pos(1.0D, -1.0D, 1.0D).tex(1.0D, 0.0D).color(255, 255, 255, l).endVertex();
worldrenderer.pos(1.0D, 1.0D, 1.0D).tex(1.0D, 1.0D).color(255, 255, 255, l).endVertex();
worldrenderer.pos(-1.0D, 1.0D, 1.0D).tex(0.0D, 1.0D).color(255, 255, 255, l).endVertex();
tessellator.draw();
GlStateManager.popMatrix();
}
GlStateManager.popMatrix();
GlStateManager.colorMask(true, true, true, false);
}
worldrenderer.setTranslation(0.0D, 0.0D, 0.0D);
GlStateManager.colorMask(true, true, true, true);
GlStateManager.matrixMode(5889);
GlStateManager.popMatrix();
GlStateManager.matrixMode(5888);
GlStateManager.popMatrix();
GlStateManager.depthMask(true);
GlStateManager.enableCull();
GlStateManager.enableDepth();
}
示例14: doRender
import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
/**
* Renders the desired {@code T} type Entity.
*/
public void doRender(EntityChatBombPrimed entity, double x, double y, double z, float entityYaw, float partialTicks) {
BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
GlStateManager.pushMatrix();
GlStateManager.translate((float)x, (float)y + 0.5F, (float)z);
if ((float)entity.getFuse() - partialTicks + 1.0F < 10.0F)
{
float f = 1.0F - ((float)entity.getFuse() - partialTicks + 1.0F) / 10.0F;
f = MathHelper.clamp(f, 0.0F, 1.0F);
f = f * f;
f = f * f;
float f1 = 1.0F + f * 0.3F;
GlStateManager.scale(f1, f1, f1);
}
float f2 = (1.0F - ((float)entity.getFuse() - partialTicks + 1.0F) / 100.0F) * 0.8F;
this.bindEntityTexture(entity);
GlStateManager.rotate(-90.0F, 0.0F, 1.0F, 0.0F);
GlStateManager.translate(-0.5F, -0.5F, 0.5F);
blockrendererdispatcher.renderBlockBrightness(ModBlocks.blockChatBomb.getDefaultState(), entity.getBrightness(partialTicks));
GlStateManager.translate(0.0F, 0.0F, 1.0F);
if (this.renderOutlines)
{
GlStateManager.enableColorMaterial();
GlStateManager.enableOutlineMode(this.getTeamColor(entity));
blockrendererdispatcher.renderBlockBrightness(ModBlocks.blockChatBomb.getDefaultState(), 1.0F);
GlStateManager.disableOutlineMode();
GlStateManager.disableColorMaterial();
}
else if (entity.getFuse() / 5 % 2 == 0)
{
GlStateManager.disableTexture2D();
GlStateManager.disableLighting();
GlStateManager.enableBlend();
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.DST_ALPHA);
GlStateManager.color(1.0F, 1.0F, 1.0F, f2);
GlStateManager.doPolygonOffset(-3.0F, -3.0F);
GlStateManager.enablePolygonOffset();
blockrendererdispatcher.renderBlockBrightness(ModBlocks.blockChatBomb.getDefaultState(), 1.0F);
GlStateManager.doPolygonOffset(0.0F, 0.0F);
GlStateManager.disablePolygonOffset();
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.disableBlend();
GlStateManager.enableLighting();
GlStateManager.enableTexture2D();
}
GlStateManager.popMatrix();
super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
示例15: renderTooltip
import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
protected void renderTooltip(ScaledResolution sr, float partialTicks) {
if (this.mc.getRenderViewEntity() instanceof EntityPlayer) {
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(widgetsTexPath);
EntityPlayer entityplayer = (EntityPlayer) this.mc.getRenderViewEntity();
int i = sr.getScaledWidth() / 2;
float f = this.zLevel;
this.zLevel = -90.0F;
if (entityplayer.inventory.currentItem != oldItem) {
timeHelper.reset();
}
if (Client.getClient().getManagers().getManager(SettingManager.class).getSetting(HUD.class, "Hotbar").getBooleanValue()) {
if (timeHelper.hasReached(1500))
anim = anim < 22 ? anim + 22 / speed * (fpsTimeHelper.getCurrentMS() - fpsTimeHelper.getLastMS())
: 22;
else {
anim = anim - 22 / speed * (fpsTimeHelper.getCurrentMS() - fpsTimeHelper.getLastMS());
if (anim < 0)
anim = 0;
}
if (mc.ingameGUI.getChatGUI().getChatOpen())
anim = 22;
fpsTimeHelper.reset();
oldItem = entityplayer.inventory.currentItem;
} else
anim = 0;
if (!Client.getClient().getManagers().getManager(SettingManager.class).getSetting(HUD.class, "Hotbar").getBooleanValue()) {
this.drawTexturedModalRect(i - 91, sr.getScaledHeight() - 22, 0, 0, 182, 22);
this.drawTexturedModalRect(i - 91 - 1 + entityplayer.inventory.currentItem * 20,
sr.getScaledHeight() - 22 - 1, 0, 22, 24, 22);
} else {
float width = sr.getScaledWidth();
float heighth = sr.getScaledHeight();
int o = new Color(255, 255, 255, 150).getRGB();
int o1 = new Color(255, 255, 255, 255).getRGB();
RenderUtils.drawRect(width, heighth, 0, heighth - 22 + anim, Integer.MIN_VALUE);
RenderUtils.drawRect(i - 91 - 1 + entityplayer.inventory.currentItem * 20 + 23, heighth,
i - 91 - 1 + entityplayer.inventory.currentItem * 20 + 1, heighth - 22 + anim, o);
RenderUtils.drawBorderedRect(i - 91 - 1 + entityplayer.inventory.currentItem * 20 + 23, heighth,
i - 91 - 1 + entityplayer.inventory.currentItem * 20 + 1, heighth - 1.5f, 0.5f,
ColorUtils.arrayColor, Color.BLACK.getRGB());
}
this.zLevel = f;
GlStateManager.enableRescaleNormal();
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
RenderHelper.enableGUIStandardItemLighting();
for (int j = 0; j < 9; ++j) {
int k = sr.getScaledWidth() / 2 - 90 + j * 20 + 2;
int l = (int) (sr.getScaledHeight() + anim - 16 - 3);
this.renderHotbarItem(j, k, l, partialTicks, entityplayer);
}
RenderHelper.disableStandardItemLighting();
GlStateManager.disableRescaleNormal();
GlStateManager.disableBlend();
}
}