当前位置: 首页>>代码示例>>Java>>正文


Java EntityCreeper.isInvisible方法代码示例

本文整理汇总了Java中net.minecraft.entity.monster.EntityCreeper.isInvisible方法的典型用法代码示例。如果您正苦于以下问题:Java EntityCreeper.isInvisible方法的具体用法?Java EntityCreeper.isInvisible怎么用?Java EntityCreeper.isInvisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.entity.monster.EntityCreeper的用法示例。


在下文中一共展示了EntityCreeper.isInvisible方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doRenderLayer

import net.minecraft.entity.monster.EntityCreeper; //导入方法依赖的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);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:28,代码来源:LayerCreeperCharge.java

示例2: doRenderLayer

import net.minecraft.entity.monster.EntityCreeper; //导入方法依赖的package包/类
public void doRenderLayer(EntityCreeper entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, 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(0.5F, 0.5F, 0.5F, 1.0F);
        GlStateManager.disableLighting();
        GlStateManager.blendFunc(GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE);
        this.creeperModel.setModelAttributes(this.creeperRenderer.getMainModel());
        Minecraft.getMinecraft().entityRenderer.func_191514_d(true);
        this.creeperModel.render(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
        Minecraft.getMinecraft().entityRenderer.func_191514_d(false);
        GlStateManager.matrixMode(5890);
        GlStateManager.loadIdentity();
        GlStateManager.matrixMode(5888);
        GlStateManager.enableLighting();
        GlStateManager.disableBlend();
        GlStateManager.depthMask(flag);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:30,代码来源:LayerCreeperCharge.java

示例3: doRenderLayer

import net.minecraft.entity.monster.EntityCreeper; //导入方法依赖的package包/类
public void doRenderLayer(EntityCreeper entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, 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(0.5F, 0.5F, 0.5F, 1.0F);
        GlStateManager.disableLighting();
        GlStateManager.blendFunc(GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE);
        this.creeperModel.setModelAttributes(this.creeperRenderer.getMainModel());
        this.creeperModel.render(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
        GlStateManager.matrixMode(5890);
        GlStateManager.loadIdentity();
        GlStateManager.matrixMode(5888);
        GlStateManager.enableLighting();
        GlStateManager.disableBlend();
        GlStateManager.depthMask(flag);
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:28,代码来源:LayerCreeperCharge.java

示例4: renderModel

import net.minecraft.entity.monster.EntityCreeper; //导入方法依赖的package包/类
/**
 * Renders the model in RenderLiving
 */
@Override
protected void renderModel(EntityCreeper 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().player);

    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 IS WHERE THE MAGIC HAPPENS
        //==========================================================================================================
        if(entitylivingbaseIn.hurtTime <= 0 || entitylivingbaseIn.deathTime > 0) {

            // Save the current OpenGL color to re-set it later
            GL11.glGetFloat(GL11.GL_CURRENT_COLOR, currentGLColor);

            int[] colorTint = BiomeColors.getBlockColors(entitylivingbaseIn, shouldOnlyUseGrassColors());
            GL11.glColor4f(colorTint[0] / 255.f, colorTint[1] / 255.f, colorTint[2] / 255.f, 1.0F);
        }
        //==========================================================================================================
        // END OF MAGIC

        this.mainModel.render(entitylivingbaseIn, p_77036_2_, p_77036_3_, p_77036_4_, p_77036_5_, p_77036_6_, p_77036_7_);

        // Re-set the GL color
        GL11.glColor4f(currentGLColor.get(0),currentGLColor.get(1),currentGLColor.get(2),currentGLColor.get(3));

        if (flag1)
        {
            GlStateManager.disableBlend();
            GlStateManager.alphaFunc(516, 0.1F);
            GlStateManager.popMatrix();
            GlStateManager.depthMask(true);
        }
    }
}
 
开发者ID:VelocityRa,项目名称:ChameleonCreepersMod,代码行数:53,代码来源:RenderChameleonCreeper.java

示例5: shouldRenderPass

import net.minecraft.entity.monster.EntityCreeper; //导入方法依赖的package包/类
/**
 * Queries whether should render the specified pass or not.
 */
protected int shouldRenderPass(EntityCreeper par1EntityCreeper, int par2, float par3)
{
    if (par1EntityCreeper.getPowered())
    {
        if (par1EntityCreeper.isInvisible())
        {
            GL11.glDepthMask(false);
        }
        else
        {
            GL11.glDepthMask(true);
        }

        if (par2 == 1)
        {
            float var4 = (float)par1EntityCreeper.ticksExisted + par3;
            this.bindTexture(armoredCreeperTextures);
            GL11.glMatrixMode(GL11.GL_TEXTURE);
            GL11.glLoadIdentity();
            float var5 = var4 * 0.01F;
            float var6 = var4 * 0.01F;
            GL11.glTranslatef(var5, var6, 0.0F);
            this.setRenderPassModel(this.creeperModel);
            GL11.glMatrixMode(GL11.GL_MODELVIEW);
            GL11.glEnable(GL11.GL_BLEND);
            float var7 = 0.5F;
            GL11.glColor4f(var7, var7, var7, 1.0F);
            GL11.glDisable(GL11.GL_LIGHTING);
            GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
            return 1;
        }

        if (par2 == 2)
        {
            GL11.glMatrixMode(GL11.GL_TEXTURE);
            GL11.glLoadIdentity();
            GL11.glMatrixMode(GL11.GL_MODELVIEW);
            GL11.glEnable(GL11.GL_LIGHTING);
            GL11.glDisable(GL11.GL_BLEND);
        }
    }

    return -1;
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:48,代码来源:RenderCreeper.java

示例6: shouldRenderPass

import net.minecraft.entity.monster.EntityCreeper; //导入方法依赖的package包/类
protected int shouldRenderPass(EntityCreeper p_77032_1_, int p_77032_2_, float p_77032_3_)
{
    if (p_77032_1_.getPowered())
    {
        if (p_77032_1_.isInvisible())
        {
            GL11.glDepthMask(false);
        }
        else
        {
            GL11.glDepthMask(true);
        }

        if (p_77032_2_ == 1)
        {
            float f1 = (float)p_77032_1_.ticksExisted + p_77032_3_;
            this.bindTexture(armoredCreeperTextures);
            GL11.glMatrixMode(GL11.GL_TEXTURE);
            GL11.glLoadIdentity();
            float f2 = f1 * 0.01F;
            float f3 = f1 * 0.01F;
            GL11.glTranslatef(f2, f3, 0.0F);
            this.setRenderPassModel(this.creeperModel);
            GL11.glMatrixMode(GL11.GL_MODELVIEW);
            GL11.glEnable(GL11.GL_BLEND);
            float f4 = 0.5F;
            GL11.glColor4f(f4, f4, f4, 1.0F);
            GL11.glDisable(GL11.GL_LIGHTING);
            GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
            return 1;
        }

        if (p_77032_2_ == 2)
        {
            GL11.glMatrixMode(GL11.GL_TEXTURE);
            GL11.glLoadIdentity();
            GL11.glMatrixMode(GL11.GL_MODELVIEW);
            GL11.glEnable(GL11.GL_LIGHTING);
            GL11.glDisable(GL11.GL_BLEND);
        }
    }

    return -1;
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:45,代码来源:RenderCreeper.java

示例7: renderCreeperPassModel

import net.minecraft.entity.monster.EntityCreeper; //导入方法依赖的package包/类
/**
 * A method used to render a creeper's powered form as a pass model.
 */
protected int renderCreeperPassModel(EntityCreeper par1EntityCreeper, int par2, float par3)
{
    if (par1EntityCreeper.getPowered())
    {
        if (par1EntityCreeper.isInvisible())
        {
            GL11.glDepthMask(false);
        }
        else
        {
            GL11.glDepthMask(true);
        }

        if (par2 == 1)
        {
            float f1 = (float)par1EntityCreeper.ticksExisted + par3;
            this.bindTexture(armoredCreeperTextures);
            GL11.glMatrixMode(GL11.GL_TEXTURE);
            GL11.glLoadIdentity();
            float f2 = f1 * 0.01F;
            float f3 = f1 * 0.01F;
            GL11.glTranslatef(f2, f3, 0.0F);
            this.setRenderPassModel(this.creeperModel);
            GL11.glMatrixMode(GL11.GL_MODELVIEW);
            GL11.glEnable(GL11.GL_BLEND);
            float f4 = 0.5F;
            GL11.glColor4f(f4, f4, f4, 1.0F);
            GL11.glDisable(GL11.GL_LIGHTING);
            GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
            return 1;
        }

        if (par2 == 2)
        {
            GL11.glMatrixMode(GL11.GL_TEXTURE);
            GL11.glLoadIdentity();
            GL11.glMatrixMode(GL11.GL_MODELVIEW);
            GL11.glEnable(GL11.GL_LIGHTING);
            GL11.glDisable(GL11.GL_BLEND);
        }
    }

    return -1;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:48,代码来源:RenderCreeper.java


注:本文中的net.minecraft.entity.monster.EntityCreeper.isInvisible方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。