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


Java EntityGhast类代码示例

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


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

示例1: addCollisionBoxToList

import net.minecraft.entity.monster.EntityGhast; //导入依赖的package包/类
@SuppressWarnings("deprecation")
@Override
public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, @Nullable Entity entityIn, boolean p_185477_7_) {
	if (entityIn instanceof EntityLivingBase && (((EntityLivingBase) entityIn).getCreatureAttribute() == EnumCreatureAttribute.UNDEAD)) {
		collidingBoxes.add(new AxisAlignedBB(pos).expand(0, 255, 0));
	}
	if (entityIn instanceof EntityLivingBase && (((EntityLivingBase) entityIn).getCreatureAttribute() == EnumCreatureAttribute.ARTHROPOD)) {
		entityIn.attackEntityFrom(DamageSource.MAGIC, 1);
	}
	if (entityIn instanceof EntityBlaze) {
		collidingBoxes.add(new AxisAlignedBB(pos).expand(0, 255, 0));
	}
	if (entityIn instanceof EntityEnderman) {
		collidingBoxes.add(new AxisAlignedBB(pos).expand(0, 255, 0));
	}
	if (entityIn instanceof EntityGhast) {
		collidingBoxes.add(new AxisAlignedBB(pos).expand(0, 255, 0));
	}
	if (entityIn instanceof EntityVex) {
		collidingBoxes.add(new AxisAlignedBB(pos).expand(0, 255, 0));
	}
}
 
开发者ID:Um-Mitternacht,项目名称:Bewitchment,代码行数:23,代码来源:BlockSaltBarrier.java

示例2: shouldAttackEntity

import net.minecraft.entity.monster.EntityGhast; //导入依赖的package包/类
public boolean shouldAttackEntity(EntityLivingBase p_142018_1_, EntityLivingBase p_142018_2_)
{
    if (!(p_142018_1_ instanceof EntityCreeper) && !(p_142018_1_ instanceof EntityGhast))
    {
        if (p_142018_1_ instanceof EntityWolf)
        {
            EntityWolf entitywolf = (EntityWolf)p_142018_1_;

            if (entitywolf.isTamed() && entitywolf.getOwner() == p_142018_2_)
            {
                return false;
            }
        }

        return p_142018_1_ instanceof EntityPlayer && p_142018_2_ instanceof EntityPlayer && !((EntityPlayer)p_142018_2_).canAttackPlayer((EntityPlayer)p_142018_1_) ? false : !(p_142018_1_ instanceof EntityHorse) || !((EntityHorse)p_142018_1_).isTame();
    }
    else
    {
        return false;
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:22,代码来源:EntityWolf.java

示例3: shouldAttackEntity

import net.minecraft.entity.monster.EntityGhast; //导入依赖的package包/类
public boolean shouldAttackEntity(EntityLivingBase p_142018_1_, EntityLivingBase p_142018_2_) {
	if (!(p_142018_1_ instanceof EntityCreeper) && !(p_142018_1_ instanceof EntityGhast)) {
		if (p_142018_1_ instanceof EntityFrienderman) {
			EntityFrienderman frienderman = (EntityFrienderman) p_142018_1_;

			if (frienderman.isTamed() && frienderman.getOwner() == p_142018_2_) {
				return false;
			}
		}

		return p_142018_1_ instanceof EntityPlayer && p_142018_2_ instanceof EntityPlayer && !((EntityPlayer) p_142018_2_).canAttackPlayer((EntityPlayer) p_142018_1_) ? false : !(p_142018_1_ instanceof EntityHorse) || !((EntityHorse) p_142018_1_).isTame();
	}
	else {
		return false;
	}
}
 
开发者ID:p455w0rd,项目名称:EndermanEvolution,代码行数:17,代码来源:EntityFrienderman.java

示例4: shouldAttackEntity

import net.minecraft.entity.monster.EntityGhast; //导入依赖的package包/类
public boolean shouldAttackEntity(EntityLivingBase p_142018_1_, EntityLivingBase p_142018_2_)
{
    if (!(p_142018_1_ instanceof EntityCreeper) && !(p_142018_1_ instanceof EntityGhast))
    {
        if (p_142018_1_ instanceof EntityWolf)
        {
            EntityWolf entitywolf = (EntityWolf)p_142018_1_;

            if (entitywolf.isTamed() && entitywolf.getOwner() == p_142018_2_)
            {
                return false;
            }
        }

        return p_142018_1_ instanceof EntityPlayer && p_142018_2_ instanceof EntityPlayer && !((EntityPlayer)p_142018_2_).canAttackPlayer((EntityPlayer)p_142018_1_) ? false : !(p_142018_1_ instanceof AbstractHorse) || !((AbstractHorse)p_142018_1_).isTame();
    }
    else
    {
        return false;
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:22,代码来源:EntityWolf.java

示例5: onClickAir

import net.minecraft.entity.monster.EntityGhast; //导入依赖的package包/类
@Override
public void onClickAir(PossessivePlayer possessivePlayer, EntityPlayer player) {
    EntityGhast possessing = (EntityGhast) possessivePlayer.getPossessing();
    if (!player.worldObj.isRemote && this.getData(player).getShort("ProjectileCooldown") <= 0) {
        player.worldObj.playEvent(null, 1018, new BlockPos((int) player.posX, (int) player.posY, (int) player.posZ), 0);
        float pitchVelocity = MathHelper.cos(player.rotationPitch * 0.017453292F);
        float velocityX = -MathHelper.sin(player.rotationYaw * 0.017453292F) * pitchVelocity;
        float velocityY = -MathHelper.sin(player.rotationPitch * 0.017453292F);
        float velocityZ = MathHelper.cos(player.rotationYaw * 0.017453292F) * pitchVelocity;
        EntityLargeFireball fireball = new EntityLargeFireball(player.worldObj, player, velocityX + player.motionX, velocityY + player.motionY, velocityZ + player.motionZ);
        fireball.posY = player.posY + player.height / 2.0F + 0.5D;
        player.worldObj.spawnEntityInWorld(fireball);
        this.getData(player).setShort("ProjectileCooldown", (short) 20);
        possessing.setAttacking(true);
    }
}
 
开发者ID:Fararise,项目名称:Possessed,代码行数:17,代码来源:GhastHandler.java

示例6: func_142018_a

import net.minecraft.entity.monster.EntityGhast; //导入依赖的package包/类
@Override
public boolean func_142018_a(EntityLivingBase par1EntityLivingBase, EntityLivingBase par2EntityLivingBase)
{
    if (!(par1EntityLivingBase instanceof EntityCreeper) && !(par1EntityLivingBase instanceof EntityGhast))
    {
        if (par1EntityLivingBase instanceof EntitySlimeling)
        {
            EntitySlimeling slimeling = (EntitySlimeling) par1EntityLivingBase;

            if (slimeling.isTamed() && slimeling.getOwner() == par2EntityLivingBase)
            {
                return false;
            }
        }

        return !(par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase)) && (!(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame());
    }
    else
    {
        return false;
    }
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:23,代码来源:EntitySlimeling.java

示例7: isValidTarget

import net.minecraft.entity.monster.EntityGhast; //导入依赖的package包/类
private boolean isValidTarget(Entity e)
{
	if (e == null) return false;
	else if (e instanceof EntityPlayer)
	{
		EntityPlayer p = ((EntityPlayer) e);
		if (p.capabilities.isCreativeMode) return false;
		else
		{
			if (kPlayers) return true;
			else if (!kTeam) return false;
			RivalRebelsPlayer rrp = RivalRebels.round.rrplayerlist.getForName(((EntityPlayer) e).getCommandSenderName());
			if (rrp == null) return kTeam;
			if (rrp.rrteam == RivalRebelsTeam.NONE) return !p.getCommandSenderName().equals(username);
			if (rrp.rrteam != team) return kTeam;
			else return false;
		}
	}
	else return (kMobs && (e instanceof EntityRhodes || (e instanceof EntityMob && !(e instanceof EntityAnimal) && !(e instanceof EntityBat) && !(e instanceof EntityVillager) && !(e instanceof EntitySquid)) || e instanceof EntityGhast));
}
 
开发者ID:rodolphito,项目名称:Rival-Rebels-Mod,代码行数:21,代码来源:TileEntityReciever.java

示例8: determineRelation

import net.minecraft.entity.monster.EntityGhast; //导入依赖的package包/类
protected Relation determineRelation() {
	if (entity instanceof EntityMob) {
		return Relation.FOE;
	} else if (entity instanceof EntitySlime) {
		return Relation.FOE;
	} else if (entity instanceof EntityGhast) {
		return Relation.FOE;
	} else if (entity instanceof EntityAnimal) {
		return Relation.FRIEND;
	} else if (entity instanceof EntitySquid) {
		return Relation.FRIEND;
	} else if (entity instanceof EntityAmbientCreature) {
		return Relation.FRIEND;
	} else {
		return Relation.UNKNOWN;
	}
}
 
开发者ID:ToroCraft,项目名称:ToroHealth,代码行数:18,代码来源:AbstractHealthDisplay.java

示例9: func_142018_a

import net.minecraft.entity.monster.EntityGhast; //导入依赖的package包/类
@Override
public boolean func_142018_a(EntityLivingBase p_142018_1_, EntityLivingBase p_142018_2_) {
	if (!(p_142018_1_ instanceof EntityCreeper) && !(p_142018_1_ instanceof EntityGhast)) {
		if (p_142018_1_ instanceof DemoEntityTameable) {
			DemoEntityTameable demoEntityTameable = (DemoEntityTameable) p_142018_1_;

			if (demoEntityTameable.isTamed() && demoEntityTameable.getOwnerEntity() == p_142018_2_) {
				return false;
			}
		}

		return p_142018_1_ instanceof EntityPlayer && p_142018_2_ instanceof EntityPlayer
				&& !((EntityPlayer) p_142018_2_).canAttackPlayer((EntityPlayer) p_142018_1_) ? false
						: !(p_142018_1_ instanceof EntityHorse) || !((EntityHorse) p_142018_1_).isTame();
	} else {
		return false;
	}
}
 
开发者ID:worldwidewoogie,项目名称:demomod,代码行数:19,代码来源:DemoEntityTameable.java

示例10: canTargetCreature

import net.minecraft.entity.monster.EntityGhast; //导入依赖的package包/类
public boolean canTargetCreature(EntityLivingBase targetMob, EntityLivingBase thisMob)
{
    if (!(targetMob instanceof EntityCreeper) && !(targetMob instanceof EntityGhast))
    {
        if (targetMob instanceof EntityIatWolf)
        {
            EntityIatWolf entitywolf = (EntityIatWolf)targetMob;

            if (entitywolf.isTamed() && entitywolf.getOwner() == thisMob)
            {
                return false;
            }
        }

        return targetMob instanceof EntityPlayer && thisMob instanceof EntityPlayer && !((EntityPlayer)thisMob).canAttackPlayer((EntityPlayer)targetMob) ? false : !(targetMob instanceof EntityHorse) || !((EntityHorse)targetMob).isTame();
    }
    else
    {
        return false;
    }
}
 
开发者ID:Alex-the-666,项目名称:It-s-About-Time-Minecraft-Mod,代码行数:22,代码来源:EntityIatWolf.java

示例11: func_142018_a

import net.minecraft.entity.monster.EntityGhast; //导入依赖的package包/类
public boolean func_142018_a(EntityLivingBase par1EntityLivingBase, EntityLivingBase par2EntityLivingBase)
{
    if (!(par1EntityLivingBase instanceof EntityCreeper) && !(par1EntityLivingBase instanceof EntityGhast))
    {
        if (par1EntityLivingBase instanceof EntityWolf)
        {
            EntityWolf var3 = (EntityWolf)par1EntityLivingBase;

            if (var3.isTamed() && var3.getOwner() == par2EntityLivingBase)
            {
                return false;
            }
        }

        return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer)par2EntityLivingBase).canAttackPlayer((EntityPlayer)par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse)par1EntityLivingBase).isTame();
    }
    else
    {
        return false;
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:22,代码来源:EntityWolf.java

示例12: preRenderCallback

import net.minecraft.entity.monster.EntityGhast; //导入依赖的package包/类
/**
 * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
 * entityLiving, partialTickTime
 */
protected void preRenderCallback(EntityGhast par1EntityGhast, float par2)
{
    float var4 = ((float)par1EntityGhast.prevAttackCounter + (float)(par1EntityGhast.attackCounter - par1EntityGhast.prevAttackCounter) * par2) / 20.0F;

    if (var4 < 0.0F)
    {
        var4 = 0.0F;
    }

    var4 = 1.0F / (var4 * var4 * var4 * var4 * var4 * 2.0F + 1.0F);
    float var5 = (8.0F + var4) / 2.0F;
    float var6 = (8.0F + 1.0F / var4) / 2.0F;
    GL11.glScalef(var6, var5, var6);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:20,代码来源:RenderGhast.java

示例13: func_142018_a

import net.minecraft.entity.monster.EntityGhast; //导入依赖的package包/类
public boolean func_142018_a(EntityLivingBase p_142018_1_, EntityLivingBase p_142018_2_)
{
    if (!(p_142018_1_ instanceof EntityCreeper) && !(p_142018_1_ instanceof EntityGhast))
    {
        if (p_142018_1_ instanceof EntityKortor)
        {
        	EntityKortor entitywolf = (EntityKortor)p_142018_1_;

            if (entitywolf.isTamed() && entitywolf.getOwner() == p_142018_2_)
            {
                return false;
            }
        }

        return p_142018_1_ instanceof EntityPlayer && p_142018_2_ instanceof EntityPlayer && !((EntityPlayer)p_142018_2_).canAttackPlayer((EntityPlayer)p_142018_1_) ? false : !(p_142018_1_ instanceof EntityHorse) || !((EntityHorse)p_142018_1_).isTame();
    }
    else
    {
        return false;
    }
}
 
开发者ID:NovaViper,项目名称:ZeroQuest,代码行数:22,代码来源:EntityKortor.java

示例14: func_142018_a

import net.minecraft.entity.monster.EntityGhast; //导入依赖的package包/类
public boolean func_142018_a(EntityLivingBase p_142018_1_, EntityLivingBase p_142018_2_)
{
    if (!(p_142018_1_ instanceof EntityCreeper) && !(p_142018_1_ instanceof EntityGhast))
    {
        if (p_142018_1_ instanceof EntityForisZertum)
        {
            EntityForisZertum entitywolf = (EntityForisZertum)p_142018_1_;

            if (entitywolf.isTamed() && entitywolf.getOwner() == p_142018_2_)
            {
                return false;
            }
        }

        return p_142018_1_ instanceof EntityPlayer && p_142018_2_ instanceof EntityPlayer && !((EntityPlayer)p_142018_2_).canAttackPlayer((EntityPlayer)p_142018_1_) ? false : !(p_142018_1_ instanceof EntityHorse) || !((EntityHorse)p_142018_1_).isTame();
    }
    else
    {
        return false;
    }
}
 
开发者ID:NovaViper,项目名称:ZeroQuest,代码行数:22,代码来源:EntityForisZertum.java

示例15: func_142018_a

import net.minecraft.entity.monster.EntityGhast; //导入依赖的package包/类
public boolean func_142018_a(EntityLivingBase p_142018_1_, EntityLivingBase p_142018_2_)
{
    if (!(p_142018_1_ instanceof EntityCreeper) && !(p_142018_1_ instanceof EntityGhast))
    {
        if (p_142018_1_ instanceof EntityDestroZertum)
        {
            EntityDestroZertum entitywolf = (EntityDestroZertum)p_142018_1_;

            if (entitywolf.isTamed() && entitywolf.getOwner() == p_142018_2_)
            {
                return false;
            }
        }

        return p_142018_1_ instanceof EntityPlayer && p_142018_2_ instanceof EntityPlayer && !((EntityPlayer)p_142018_2_).canAttackPlayer((EntityPlayer)p_142018_1_) ? false : !(p_142018_1_ instanceof EntityHorse) || !((EntityHorse)p_142018_1_).isTame();
    }
    else
    {
        return false;
    }
}
 
开发者ID:NovaViper,项目名称:ZeroQuest,代码行数:22,代码来源:EntityDestroZertum.java


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