當前位置: 首頁>>代碼示例>>Java>>正文


Java Entity.isInvisible方法代碼示例

本文整理匯總了Java中net.minecraft.entity.Entity.isInvisible方法的典型用法代碼示例。如果您正苦於以下問題:Java Entity.isInvisible方法的具體用法?Java Entity.isInvisible怎麽用?Java Entity.isInvisible使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.entity.Entity的用法示例。


在下文中一共展示了Entity.isInvisible方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: doRenderShadowAndFire

import net.minecraft.entity.Entity; //導入方法依賴的package包/類
/**
 * Renders the entity's shadow and fire (if its on fire). Args: entity, x, y, z, yaw, partialTickTime
 */
public void doRenderShadowAndFire(Entity entityIn, double x, double y, double z, float yaw, float partialTicks)
{
    if (this.renderManager.options != null)
    {
        if (this.renderManager.options.field_181151_V && this.shadowSize > 0.0F && !entityIn.isInvisible() && this.renderManager.isRenderShadow())
        {
            double d0 = this.renderManager.getDistanceToCamera(entityIn.posX, entityIn.posY, entityIn.posZ);
            float f = (float)((1.0D - d0 / 256.0D) * (double)this.shadowOpaque);

            if (f > 0.0F)
            {
                this.renderShadow(entityIn, x, y, z, f, partialTicks);
            }
        }

        if (entityIn.canRenderOnFire() && (!(entityIn instanceof EntityPlayer) || !((EntityPlayer)entityIn).isSpectator()))
        {
            this.renderEntityOnFire(entityIn, x, y, z, partialTicks);
        }
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:25,代碼來源:Render.java

示例2: onUpdate

import net.minecraft.entity.Entity; //導入方法依賴的package包/類
@Override
public void onUpdate()
{
	mobs.clear();
	for(Entity entity : WMinecraft.getWorld().loadedEntityList)
	{
		if(!(entity instanceof EntityLiving))
			continue;
		
		if(!wurst.special.targetSpf.invisibleMobs.isChecked()
			&& entity.isInvisible())
			continue;
		
		mobs.add((EntityLiving)entity);
	}
}
 
開發者ID:Wurst-Imperium,項目名稱:Wurst-MC-1.12,代碼行數:17,代碼來源:MobEspMod.java

示例3: doRenderShadowAndFire

import net.minecraft.entity.Entity; //導入方法依賴的package包/類
/**
 * Renders the entity's shadow and fire (if its on fire). Args: entity, x, y, z,
 * yaw, partialTickTime
 */
public void doRenderShadowAndFire(Entity entityIn, double x, double y, double z, float yaw, float partialTicks) {
	if (this.renderManager.options != null) {
		if (this.renderManager.options.field_181151_V && this.shadowSize > 0.0F && !entityIn.isInvisible()
				&& this.renderManager.isRenderShadow()) {
			double d0 = this.renderManager.getDistanceToCamera(entityIn.posX, entityIn.posY, entityIn.posZ);
			float f = (float) ((1.0D - d0 / 256.0D) * (double) this.shadowOpaque);

			if (f > 0.0F) {
				this.renderShadow(entityIn, x, y, z, f, partialTicks);
			}
		}

		if (entityIn.canRenderOnFire()
				&& (!(entityIn instanceof EntityPlayer) || !((EntityPlayer) entityIn).isSpectator())) {
			this.renderEntityOnFire(entityIn, x, y, z, partialTicks);
		}
	}
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:23,代碼來源:Render.java

示例4: doRenderShadowAndFire

import net.minecraft.entity.Entity; //導入方法依賴的package包/類
/**
 * Renders the entity's shadow and fire (if its on fire). Args: entity, x, y, z, yaw, partialTickTime
 */
public void doRenderShadowAndFire(Entity entityIn, double x, double y, double z, float yaw, float partialTicks)
{
    if (this.renderManager.options != null)
    {
        if (this.renderManager.options.entityShadows && this.shadowSize > 0.0F && !entityIn.isInvisible() && this.renderManager.isRenderShadow())
        {
            double d0 = this.renderManager.getDistanceToCamera(entityIn.posX, entityIn.posY, entityIn.posZ);
            float f = (float)((1.0D - d0 / 256.0D) * (double)this.shadowOpaque);

            if (f > 0.0F)
            {
                this.renderShadow(entityIn, x, y, z, f, partialTicks);
            }
        }

        if (entityIn.canRenderOnFire() && (!(entityIn instanceof EntityPlayer) || !((EntityPlayer)entityIn).isSpectator()))
        {
            this.renderEntityOnFire(entityIn, x, y, z, partialTicks);
        }
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:25,代碼來源:Render.java

示例5: apply

import net.minecraft.entity.Entity; //導入方法依賴的package包/類
public boolean apply(Entity p_apply_1_)
{
    return p_apply_1_ instanceof IMob && !p_apply_1_.isInvisible();
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:5,代碼來源:IMob.java

示例6: doRenderEntity

import net.minecraft.entity.Entity; //導入方法依賴的package包/類
public boolean doRenderEntity(Entity entity, double x, double y, double z, float entityYaw, float partialTicks, boolean p_147939_10_)
{
    Render<Entity> render = null;

    try
    {
        render = this.<Entity>getEntityRenderObject(entity);

        if (render != null && this.renderEngine != null)
        {
            try
            {
                if (render instanceof RendererLivingEntity)
                {
                    ((RendererLivingEntity)render).setRenderOutlines(this.renderOutlines);
                }

                render.doRender(entity, x, y, z, entityYaw, partialTicks);
            }
            catch (Throwable throwable2)
            {
                throw new ReportedException(CrashReport.makeCrashReport(throwable2, "Rendering entity in world"));
            }

            try
            {
                if (!this.renderOutlines)
                {
                    render.doRenderShadowAndFire(entity, x, y, z, entityYaw, partialTicks);
                }
            }
            catch (Throwable throwable1)
            {
                throw new ReportedException(CrashReport.makeCrashReport(throwable1, "Post-rendering entity in world"));
            }

            if (this.debugBoundingBox && !entity.isInvisible() && !p_147939_10_)
            {
                try
                {
                    this.renderDebugBoundingBox(entity, x, y, z, entityYaw, partialTicks);
                }
                catch (Throwable throwable)
                {
                    throw new ReportedException(CrashReport.makeCrashReport(throwable, "Rendering entity hitbox in world"));
                }
            }
        }
        else if (this.renderEngine != null)
        {
            return false;
        }

        return true;
    }
    catch (Throwable throwable3)
    {
        CrashReport crashreport = CrashReport.makeCrashReport(throwable3, "Rendering entity in world");
        CrashReportCategory crashreportcategory = crashreport.makeCategory("Entity being rendered");
        entity.addEntityCrashInfo(crashreportcategory);
        CrashReportCategory crashreportcategory1 = crashreport.makeCategory("Renderer details");
        crashreportcategory1.addCrashSection("Assigned renderer", render);
        crashreportcategory1.addCrashSection("Location", CrashReportCategory.getCoordinateInfo(x, y, z));
        crashreportcategory1.addCrashSection("Rotation", Float.valueOf(entityYaw));
        crashreportcategory1.addCrashSection("Delta", Float.valueOf(partialTicks));
        throw new ReportedException(crashreport);
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:69,代碼來源:RenderManager.java

示例7: onRender

import net.minecraft.entity.Entity; //導入方法依賴的package包/類
@Override
public void onRender(float partialTicks)
{
	// GL settings
	GL11.glEnable(GL11.GL_BLEND);
	GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
	GL11.glEnable(GL11.GL_LINE_SMOOTH);
	GL11.glLineWidth(2);
	GL11.glDisable(GL11.GL_TEXTURE_2D);
	GL11.glEnable(GL11.GL_CULL_FACE);
	GL11.glDisable(GL11.GL_DEPTH_TEST);
	
	GL11.glPushMatrix();
	GL11.glTranslated(-mc.getRenderManager().renderPosX,
		-mc.getRenderManager().renderPosY,
		-mc.getRenderManager().renderPosZ);
	
	// set color
	float alpha = 0.5F + 0.25F * WMath
		.sin(System.currentTimeMillis() % 1000 / 500F * (float)Math.PI);
	GL11.glColor4f(1, 0, 0, alpha);
	
	// draw boxes
	for(Entity entity : WMinecraft.getWorld().loadedEntityList)
	{
		if(!(entity instanceof EntityLiving))
			continue;
		
		if(!entity.isInvisible())
			continue;
		
		if(WMinecraft.getPlayer().getDistanceSqToEntity(entity) < 0.25)
			continue;
		
		GL11.glPushMatrix();
		GL11.glTranslated(entity.posX, entity.posY, entity.posZ);
		
		RenderUtils.drawOutlinedBox(FAKE_BLOCK_BOX);
		RenderUtils.drawSolidBox(FAKE_BLOCK_BOX);
		
		GL11.glPopMatrix();
	}
	
	GL11.glPopMatrix();
	
	// GL resets
	GL11.glEnable(GL11.GL_DEPTH_TEST);
	GL11.glEnable(GL11.GL_TEXTURE_2D);
	GL11.glDisable(GL11.GL_BLEND);
	GL11.glDisable(GL11.GL_LINE_SMOOTH);
}
 
開發者ID:Wurst-Imperium,項目名稱:Wurst-MC-1.12,代碼行數:52,代碼來源:ProphuntEspMod.java

示例8: doRenderEntity

import net.minecraft.entity.Entity; //導入方法依賴的package包/類
public boolean doRenderEntity(Entity entity, double x, double y, double z, float entityYaw, float partialTicks, boolean p_147939_10_)
{
    Render render = null;

    try
    {
        render = this.getEntityRenderObject(entity);

        if (render != null && this.renderEngine != null)
        {
            try
            {
                if (render instanceof RendererLivingEntity)
                {
                    ((RendererLivingEntity)render).setRenderOutlines(this.renderOutlines);
                }

                render.doRender(entity, x, y, z, entityYaw, partialTicks);
            }
            catch (Throwable throwable2)
            {
                throw new ReportedException(CrashReport.makeCrashReport(throwable2, "Rendering entity in world"));
            }

            try
            {
                if (!this.renderOutlines)
                {
                    render.doRenderShadowAndFire(entity, x, y, z, entityYaw, partialTicks);
                }
            }
            catch (Throwable throwable1)
            {
                throw new ReportedException(CrashReport.makeCrashReport(throwable1, "Post-rendering entity in world"));
            }

            if (this.debugBoundingBox && !entity.isInvisible() && !p_147939_10_)
            {
                try
                {
                    this.renderDebugBoundingBox(entity, x, y, z, entityYaw, partialTicks);
                }
                catch (Throwable throwable)
                {
                    throw new ReportedException(CrashReport.makeCrashReport(throwable, "Rendering entity hitbox in world"));
                }
            }
        }
        else if (this.renderEngine != null)
        {
            return false;
        }

        return true;
    }
    catch (Throwable throwable3)
    {
        CrashReport crashreport = CrashReport.makeCrashReport(throwable3, "Rendering entity in world");
        CrashReportCategory crashreportcategory = crashreport.makeCategory("Entity being rendered");
        entity.addEntityCrashInfo(crashreportcategory);
        CrashReportCategory crashreportcategory1 = crashreport.makeCategory("Renderer details");
        crashreportcategory1.addCrashSection("Assigned renderer", render);
        crashreportcategory1.addCrashSection("Location", CrashReportCategory.getCoordinateInfo(x, y, z));
        crashreportcategory1.addCrashSection("Rotation", Float.valueOf(entityYaw));
        crashreportcategory1.addCrashSection("Delta", Float.valueOf(partialTicks));
        throw new ReportedException(crashreport);
    }
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:69,代碼來源:RenderManager.java

示例9: apply

import net.minecraft.entity.Entity; //導入方法依賴的package包/類
public boolean apply(@Nullable Entity p_apply_1_)
{
    return p_apply_1_ instanceof IMob && !p_apply_1_.isInvisible();
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:5,代碼來源:IMob.java

示例10: doRenderEntity

import net.minecraft.entity.Entity; //導入方法依賴的package包/類
public void doRenderEntity(Entity entityIn, double x, double y, double z, float yaw, float partialTicks, boolean p_188391_10_)
{
    Render<Entity> render = null;

    try
    {
        render = this.<Entity>getEntityRenderObject(entityIn);

        if (render != null && this.renderEngine != null)
        {
            try
            {
                render.setRenderOutlines(this.renderOutlines);

                if (CustomEntityModels.isActive())
                {
                    this.renderEntity = entityIn;
                    this.renderRender = render;
                }

                render.doRender(entityIn, x, y, z, yaw, partialTicks);
            }
            catch (Throwable throwable2)
            {
                throw new ReportedException(CrashReport.makeCrashReport(throwable2, "Rendering entity in world"));
            }

            try
            {
                if (!this.renderOutlines)
                {
                    render.doRenderShadowAndFire(entityIn, x, y, z, yaw, partialTicks);
                }
            }
            catch (Throwable throwable1)
            {
                throw new ReportedException(CrashReport.makeCrashReport(throwable1, "Post-rendering entity in world"));
            }

            if (this.debugBoundingBox && !entityIn.isInvisible() && !p_188391_10_ && !Minecraft.getMinecraft().isReducedDebug())
            {
                try
                {
                    this.renderDebugBoundingBox(entityIn, x, y, z, yaw, partialTicks);
                }
                catch (Throwable throwable)
                {
                    throw new ReportedException(CrashReport.makeCrashReport(throwable, "Rendering entity hitbox in world"));
                }
            }
        }
    }
    catch (Throwable throwable3)
    {
        CrashReport crashreport = CrashReport.makeCrashReport(throwable3, "Rendering entity in world");
        CrashReportCategory crashreportcategory = crashreport.makeCategory("Entity being rendered");
        entityIn.addEntityCrashInfo(crashreportcategory);
        CrashReportCategory crashreportcategory1 = crashreport.makeCategory("Renderer details");
        crashreportcategory1.addCrashSection("Assigned renderer", render);
        crashreportcategory1.addCrashSection("Location", CrashReportCategory.getCoordinateInfo(x, y, z));
        crashreportcategory1.addCrashSection("Rotation", Float.valueOf(yaw));
        crashreportcategory1.addCrashSection("Delta", Float.valueOf(partialTicks));
        throw new ReportedException(crashreport);
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:66,代碼來源:RenderManager.java

示例11: doRenderEntity

import net.minecraft.entity.Entity; //導入方法依賴的package包/類
public void doRenderEntity(Entity entityIn, double x, double y, double z, float yaw, float partialTicks, boolean p_188391_10_)
{
    Render<Entity> render = null;

    try
    {
        render = this.<Entity>getEntityRenderObject(entityIn);

        if (render != null && this.renderEngine != null)
        {
            try
            {
                render.setRenderOutlines(this.renderOutlines);
                render.doRender(entityIn, x, y, z, yaw, partialTicks);
            }
            catch (Throwable throwable1)
            {
                throw new ReportedException(CrashReport.makeCrashReport(throwable1, "Rendering entity in world"));
            }

            try
            {
                if (!this.renderOutlines)
                {
                    render.doRenderShadowAndFire(entityIn, x, y, z, yaw, partialTicks);
                }
            }
            catch (Throwable throwable2)
            {
                throw new ReportedException(CrashReport.makeCrashReport(throwable2, "Post-rendering entity in world"));
            }

            if (this.debugBoundingBox && !entityIn.isInvisible() && !p_188391_10_ && !Minecraft.getMinecraft().isReducedDebug())
            {
                try
                {
                    this.renderDebugBoundingBox(entityIn, x, y, z, yaw, partialTicks);
                }
                catch (Throwable throwable)
                {
                    throw new ReportedException(CrashReport.makeCrashReport(throwable, "Rendering entity hitbox in world"));
                }
            }
        }
    }
    catch (Throwable throwable3)
    {
        CrashReport crashreport = CrashReport.makeCrashReport(throwable3, "Rendering entity in world");
        CrashReportCategory crashreportcategory = crashreport.makeCategory("Entity being rendered");
        entityIn.addEntityCrashInfo(crashreportcategory);
        CrashReportCategory crashreportcategory1 = crashreport.makeCategory("Renderer details");
        crashreportcategory1.addCrashSection("Assigned renderer", render);
        crashreportcategory1.addCrashSection("Location", CrashReportCategory.getCoordinateInfo(x, y, z));
        crashreportcategory1.addCrashSection("Rotation", Float.valueOf(yaw));
        crashreportcategory1.addCrashSection("Delta", Float.valueOf(partialTicks));
        throw new ReportedException(crashreport);
    }
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:59,代碼來源:RenderManager.java


注:本文中的net.minecraft.entity.Entity.isInvisible方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。