net.minecraft.util.DamageSource Java Examples

The following examples show how to use net.minecraft.util.DamageSource. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MoCEntityScorpion.java    From mocreaturesdev with GNU General Public License v3.0 6 votes vote down vote up
@Override
public boolean attackEntityFrom(DamageSource damagesource, int i)
{
    if (super.attackEntityFrom(damagesource, i))
    {
        Entity entity = damagesource.getEntity();
        //if ((entity != null) && (entity instanceof EntityPlayer) && getIsTamed()) { return false; }

        if ((entity != null) && (entity != this) && (worldObj.difficultySetting > 0) && getIsAdult())
        {
            entityToAttack = entity;
        }
        return true;
    }
    else
    {
        return false;
    }
}
 
Example #2
Source File: EntityTofunian.java    From TofuCraftReload with MIT License 6 votes vote down vote up
public void onDeath(DamageSource cause) {
    if (this.village != null) {
        Entity entity = cause.getTrueSource();

        if (entity != null) {
            if (entity instanceof EntityPlayer) {
                this.village.modifyPlayerReputation(entity.getUniqueID(), -2);
            } else if (entity instanceof IMob) {
                this.village.endMatingSeason();
            }
        } else {
            EntityPlayer entityplayer = this.world.getClosestPlayerToEntity(this, 16.0D);

            if (entityplayer != null) {
                this.village.endMatingSeason();
            }
        }
    }

    super.onDeath(cause);
}
 
Example #3
Source File: EntityFukumame.java    From TofuCraftReload with MIT License 6 votes vote down vote up
/**
 * Called when this EntityThrowable hits a block or entity.
 */
@Override
protected void onImpact(RayTraceResult par1MovingObjectPosition) {
    Entity entityHit = par1MovingObjectPosition.entityHit;
    if (entityHit == this.ignoreEntity && this.age < 5) {
        return;
    }
    if (par1MovingObjectPosition.entityHit != null) {
        double d = this.getDamage();
        d *= this.isCrit ? 2.5D : 1.0D;


        entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float) d);
        if (entityHit instanceof EntityLivingBase) {
            EntityLivingBase entityLivivng = (EntityLivingBase) entityHit;
            entityLivivng.hurtResistantTime = entityLivivng.maxHurtResistantTime / 2;
        }
        for (int i = 0; i < 3; ++i) {
            this.world.spawnParticle(EnumParticleTypes.SNOWBALL, this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
        }
    }

    if (!this.world.isRemote) {
        this.setDead();
    }
}
 
Example #4
Source File: ProjectileStone.java    From ExNihiloAdscensio with MIT License 6 votes vote down vote up
@Override
protected void onImpact(RayTraceResult result)
{
    if (result.entityHit != null)
    {
        result.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, getThrower()), (int) (Math.random() * (4.0F / 3.0F)));
    }
    else if (!world.isRemote)
    {
        setDead();
        
        if(stack != null)
        {
            world.spawnEntity(new EntityItem(world, posX, posY, posZ, stack));
        }
    }
    
    for (int j = 0; j < 8; ++j)
    {
        world.spawnParticle(EnumParticleTypes.BLOCK_CRACK, posX, posY, posZ, 0.0D, 0.0D, 0.0D, new int[] { Block.getStateId(Blocks.STONE.getDefaultState()) });
    }
}
 
Example #5
Source File: EntityTofuGandlem.java    From TofuCraftReload with MIT License 6 votes vote down vote up
@Override
public boolean attackEntityFrom(DamageSource source, float amount) {
    if (this.isEntityInvulnerable(source)) {
        return false;
    } else if (source.getImmediateSource() instanceof EntityFukumame) {
        return false;
    } else {
        if (isSleep()) {
            setSleep(false);

           /* if(source.getImmediateSource() instanceof EntityPlayerMP) {
                this.bossInfo.addPlayer((EntityPlayerMP) source.getImmediateSource());
            }*/
        }
        if (source.getImmediateSource() instanceof EntityArrow) {
            return super.attackEntityFrom(source, amount * 0.8F);
        } else {
            return super.attackEntityFrom(source, amount);
        }
    }
}
 
Example #6
Source File: MoCEntityFlameWraith.java    From mocreaturesdev with GNU General Public License v3.0 6 votes vote down vote up
@Override
protected void attackEntity(Entity entity, float f)
{
    if (attackTime <= 0 && (f < 2.5D) && (entity.boundingBox.maxY > boundingBox.minY) && (entity.boundingBox.minY < boundingBox.maxY))
    {
        attackTime = 20;
        entity.attackEntityFrom(DamageSource.causeMobDamage(this), 2);

        if (MoCreatures.isServer() && !worldObj.provider.isHellWorld)
        {
            ((EntityLiving) entity).setFire(burningTime);
        }

        //entity.fire = burningTime;
    }
}
 
Example #7
Source File: MoCEntityWyvern.java    From mocreaturesdev with GNU General Public License v3.0 6 votes vote down vote up
@Override
protected void attackEntity(Entity entity, float f)
{
    
    if (attackTime <= 0 && (f < 3.0D) && (entity.boundingBox.maxY > boundingBox.minY) && (entity.boundingBox.minY < boundingBox.maxY))
    {
        attackTime = 20;
        boolean flag = (rand.nextInt(3) == 0);
        if (flag)
        {
            if (entity instanceof EntityPlayer) 
            {
            	MoCreatures.poisonPlayer((EntityPlayer) entity);
            }
            ((EntityLiving) entity).addPotionEffect(new PotionEffect(Potion.poison.id, 200, 0));
            MoCTools.playCustomSound(this, "wyvernpoisoning", worldObj);
        }
        
        int dmg = 5;
        if (getType() >= 5) dmg = 10;
        entity.attackEntityFrom(DamageSource.causeMobDamage(this), dmg);
        openMouth();
    }
}
 
Example #8
Source File: MoCEntityPetScorpion.java    From mocreaturesdev with GNU General Public License v3.0 6 votes vote down vote up
@Override
public boolean attackEntityFrom(DamageSource damagesource, int i)
{
    if (super.attackEntityFrom(damagesource, i))
    {
        Entity entity = damagesource.getEntity();
        if ((entity != null) && (entity instanceof EntityPlayer) && getIsTamed()) { return false; }

        if ((entity != null) && (entity != this) && (worldObj.difficultySetting > 0) && getIsAdult())
        {
            entityToAttack = entity;
        }
        return true;
    }
    else
    {
        return false;
    }
}
 
Example #9
Source File: MoCTools.java    From mocreaturesdev with GNU General Public License v3.0 6 votes vote down vote up
public static void buckleMobs(EntityLiving entityattacker, Double dist, World worldObj)
{
    List list = worldObj.getEntitiesWithinAABBExcludingEntity(entityattacker, entityattacker.boundingBox.expand(dist, 2D, dist));
    for (int i = 0; i < list.size(); i++)
    {
        Entity entitytarget = (Entity) list.get(i);
        if (!(entitytarget instanceof EntityLiving) || (entityattacker.riddenByEntity != null && entitytarget == entityattacker.riddenByEntity))
        {
            continue;
        }
        //EntityMob entitymob = (EntityMob) entity;
        entitytarget.attackEntityFrom(DamageSource.causeMobDamage(entityattacker), 2);
        bigsmack(entityattacker, entitytarget, 0.6F);
        playCustomSound(entityattacker, "tud", worldObj);
        //todo tuck sound!!
    }
}
 
Example #10
Source File: EntityShip.java    From archimedes-ships with MIT License 6 votes vote down vote up
@Override
public boolean attackEntityFrom(DamageSource source, float damage)
{
	/*if (source.isExplosion())
	{
		if (source.getEntity() != null && source.getEntity().getClass().getName().equals("ckathode.weaponmod.entity.projectile.EntityCannonBall"))
		{
			double dx = source.getEntity().posX - posX;
			double dy = source.getEntity().posY - posY;
			double dz = source.getEntity().posZ - posZ;
			
			Vec3 vec = worldObj.getWorldVec3Pool().getVecFromPool(dx, dy, dz);
			vec.rotateAroundY((float) Math.toRadians(-rotationYaw));
			
			worldObj.createExplosion(source.getEntity(), source.getEntity().posX, source.getEntity().posY, source.getEntity().posZ, 4F, false);
			source.getEntity().setDead();
		}
	}*/
	return false;
}
 
Example #11
Source File: RegisteredFamiliarAI_Old.java    From Gadomancy with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
public void tick(int ticksSoFar, World world, EntityPlayer parent, ItemStack itemStack) {
    int rangeInc = ((ItemFamiliar_Old) itemStack.getItem()).getAttackRangeIncrease(itemStack);

    List<EntityLivingBase> lastTargetters = getPotentialTargets(world, parent, rangeInc);
    if(lastTargetters.size() == 0) {
        FamiliarAIController_Old.cleanTargetterList(parent);
        return;
    }
    EntityLivingBase mob = lastTargetters.get(world.rand.nextInt(lastTargetters.size()));
    if(mob.isDead || mob instanceof EntityPlayer) {
        FamiliarAIController_Old.cleanTargetterList(parent);
        return;
    }

    mob.attackEntityFrom(DamageSource.magic, ((ItemFamiliar_Old) itemStack.getItem()).getAttackStrength(itemStack));

    world.playSoundEffect(mob.posX + 0.5, mob.posY + 0.5, mob.posZ + 0.5, "thaumcraft:zap", 0.8F, 1.0F);

    PacketFamiliarBolt bolt = new PacketFamiliarBolt(parent.getCommandSenderName(), (float) mob.posX, (float) mob.posY, (float) mob.posZ, 6, true);
    PacketHandler.INSTANCE.sendToAllAround(bolt, new NetworkRegistry.TargetPoint(mob.worldObj.provider.dimensionId, mob.posX, mob.posY, mob.posZ, 32));
    FamiliarAIController_Old.cleanTargetterList(parent);
}
 
Example #12
Source File: MoCEntityShark.java    From mocreaturesdev with GNU General Public License v3.0 6 votes vote down vote up
@Override
public boolean attackEntityFrom(DamageSource damagesource, int i)
{
    if (super.attackEntityFrom(damagesource, i) && (worldObj.difficultySetting > 0))
    {
        Entity entity = damagesource.getEntity();
        if ((riddenByEntity == entity) || (ridingEntity == entity)) { return true; }
        if (entity != this)
        {
            entityToAttack = entity;
        }
        return true;
    }
    else
    {
        return false;
    }
}
 
Example #13
Source File: MoCEntityWyvern.java    From mocreaturesdev with GNU General Public License v3.0 6 votes vote down vote up
@Override
public boolean attackEntityFrom(DamageSource damagesource, int i)
{
    if (super.attackEntityFrom(damagesource, i))
    {
        Entity entity = damagesource.getEntity();
     
        
        if (entity != null && getIsTamed() && entity instanceof EntityPlayer) { return false; }
        

        if ((riddenByEntity != null) && (entity == riddenByEntity)) { return false; }
        
        if ((entity != this) && (worldObj.difficultySetting > 0))
        {
            entityToAttack = entity;
        }
        return true;
    }
    return false;
}
 
Example #14
Source File: MoCEntityDolphin.java    From mocreaturesdev with GNU General Public License v3.0 6 votes vote down vote up
@Override
public boolean attackEntityFrom(DamageSource damagesource, int i)
{
    if (super.attackEntityFrom(damagesource, i) && (worldObj.difficultySetting > 0))
    {
        Entity entity = damagesource.getEntity();
        if ((riddenByEntity == entity) || (ridingEntity == entity)) { return true; }
        if (entity != this)
        {
            entityToAttack = entity;
        }
        return true;
    }
    else
    {
        return false;
    }
}
 
Example #15
Source File: BloodStaffUpdate.java    From ForbiddenMagic with Do What The F*ck You Want To Public License 5 votes vote down vote up
public boolean syphonHealth(EntityPlayer player){
    if(player.getHealth() > 3){
        player.setHealth(player.getHealth() - 3);
        return true;
    }
    else if(player.getHealth() > 0){
        player.func_110142_aN().func_94547_a(new DamageSource("blooderp"), 3, 3);
        player.setHealth(0);
        player.onDeath(new DamageSource("blooderp"));
        return true;
    }
    else
        return false;
}
 
Example #16
Source File: EntityDireSlime.java    From EnderZoo with Creative Commons Zero v1.0 Universal 5 votes vote down vote up
@Override
protected float applyArmorCalculations(DamageSource p_70655_1_, float p_70655_2_) {
    if (!p_70655_1_.isUnblockable()) {
      return Math.min(Math.max(p_70655_2_ - 3 - this.getSlimeSize(), this.getSlimeSize()) / 2, p_70655_2_);
    }
    return p_70655_2_;
}
 
Example #17
Source File: EntitySpiritWight.java    From Wizardry with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public boolean attackEntityFrom(@Nonnull DamageSource source, float amount) {
	if (source.isMagicDamage() || source == DamageSource.OUT_OF_WORLD) {
		super.attackEntityFrom(source, amount);
		ClientRunnable.run(new ClientRunnable() {
			@Override
			@SideOnly(Side.CLIENT)
			public void runIfClient() {
				LibParticles.SPIRIT_WIGHT_HURT(world, getPositionVector());
			}
		});
		return true;
	} else return false;
}
 
Example #18
Source File: MoCEntityHorse.java    From mocreaturesdev with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void fall(float f)
{
    if (isFlyer() || isFloater()) { return; }

    int i = (int) Math.ceil(f - 3F);
    if ((i > 0)) // && (type != 8))
    {
        if (getType() >= 10)
        {
            i /= 3;
        }
        if (i > 0)
        {
            attackEntityFrom(DamageSource.fall, i);
        }
        if ((riddenByEntity != null) && (i > 0))
        {
            riddenByEntity.attackEntityFrom(DamageSource.fall, i);
        }

        int j = worldObj.getBlockId(MathHelper.floor_double(posX), MathHelper.floor_double(posY - 0.20000000298023221D - prevRotationPitch), MathHelper.floor_double(posZ));
        if (j > 0)
        {
            StepSound stepsound = Block.blocksList[j].stepSound;
            worldObj.playSoundAtEntity(this, stepsound.getStepSound(), stepsound.getVolume() * 0.5F, stepsound.getPitch() * 0.75F);
        }
    }
}
 
Example #19
Source File: EntityClayGolem.java    From Artifacts with MIT License 5 votes vote down vote up
/**
 * Called when the mob's health reaches 0.
 */
public void onDeath(DamageSource par1DamageSource)
{
    /*if (!this.isPlayerCreated() && this.attackingPlayer != null && this.villageObj != null)
    {
        this.villageObj.setReputationForPlayer(this.attackingPlayer.getCommandSenderName(), -5);
    }*/

    super.onDeath(par1DamageSource);
}
 
Example #20
Source File: EntityRainbowGuard.java    From ToroQuest with GNU General Public License v3.0 5 votes vote down vote up
public boolean attackEntityFrom(DamageSource source, float amount) {
	if (!super.attackEntityFrom(source, amount)) {
		return false;
	}

	if (isAtAttention()) {
		setAtAttention(false);
	}

	EntityLivingBase attacker = this.getAttackTarget();
	if (attacker == null && source.getTrueSource() instanceof EntityLivingBase) {
		setAttackTarget((EntityLivingBase) source.getTrueSource());
	}
	return true;
}
 
Example #21
Source File: EntityEndermanFighter.java    From enderutilities with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public boolean attackEntityFrom(DamageSource source, float damage)
{
    if (this.isEntityInvulnerable(source))
    {
        return false;
    }

    this.setScreaming(true);

    /*if (source instanceof EntityDamageSource && source.getEntity() instanceof EntityLivingBase)
    {
        this.setRevengeTarget((EntityLivingBase) source.getEntity());
    }*/

    if (source.getTrueSource() == null)
    {
        for (int i = 0; i < 64; ++i)
        {
            if (this.teleportRandomly())
            {
                return true;
            }
        }
    }

    return super.attackEntityFrom(source, damage);
}
 
Example #22
Source File: TileExtendedNode.java    From Gadomancy with GNU Lesser General Public License v3.0 5 votes vote down vote up
private boolean handleGrowingNodeSecond(boolean needUpdate) {
    if(extendedNodeType == null || extendedNodeType != ExtendedNodeType.GROWING) return needUpdate;

    if(worldObj.difficultySetting == EnumDifficulty.PEACEFUL) return needUpdate;
    if(worldObj.isRemote) return needUpdate;
    if(ticksExisted % 8 != 0) return needUpdate;

    List livingEntities = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(xCoord, yCoord, zCoord, xCoord + 1, yCoord + 1, zCoord + 1).expand(6.0D, 6.0D, 6.0D));
    if ((livingEntities != null) && (livingEntities.size() > 0)) {
        for (Object e : livingEntities) {
            EntityLivingBase livingEntity = (EntityLivingBase) e;
            if ((livingEntity.isEntityAlive()) && (!livingEntity.isEntityInvulnerable())) {
                if(livingEntity instanceof EntityPlayer && ((EntityPlayer) livingEntity).capabilities.isCreativeMode) continue;
                if(!behavior.mayZapNow()) continue;

                ResearchHelper.distributeResearch(Gadomancy.MODID.toUpperCase() + ".GROWING_AGGRESSION", worldObj, xCoord, yCoord, zCoord, 6);

                livingEntity.attackEntityFrom(DamageSource.magic, behavior.getZapDamage());

                worldObj.playSoundEffect(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, "thaumcraft:zap", 0.8F, 1.0F);

                PacketTCNodeBolt packet = new PacketTCNodeBolt(xCoord + 0.5F, yCoord + 0.5F, zCoord + 0.5F, (float) livingEntity.posX, (float) (livingEntity.posY + livingEntity.height), (float) livingEntity.posZ, 0, false);
                PacketHandler.INSTANCE.sendToAllAround(packet, new NetworkRegistry.TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 32.0D));
            }
        }
    }

    return needUpdate;
}
 
Example #23
Source File: EntityBas.java    From ToroQuest with GNU General Public License v3.0 5 votes vote down vote up
protected void achievement(DamageSource cause) {
	if (world.isRemote) {
		return;
	}
	Entity entity = cause.getTrueSource();
	if (entity != null && entity instanceof EntityPlayer) {
		//TODO
		//((EntityPlayer) entity).addStat(BASTION_ACHIEVEMNT);
	}
}
 
Example #24
Source File: MetaTileEntityMagicEnergyAbsorber.java    From GregTech with GNU Lesser General Public License v3.0 5 votes vote down vote up
private void updateConnectedCrystals() {
    this.connectedCrystalsIds.clear();
    final double maxDistance = 64 * 64;
    List<EntityEnderCrystal> enderCrystals = Arrays.stream(BiomeEndDecorator.getSpikesForWorld(getWorld()))
        .flatMap(endSpike -> getWorld().getEntitiesWithinAABB(EntityEnderCrystal.class, endSpike.getTopBoundingBox()).stream())
        .filter(crystal -> crystal.getDistanceSq(getPos()) < maxDistance)
        .collect(Collectors.toList());

    for (EntityEnderCrystal entityEnderCrystal : enderCrystals) {
        BlockPos beamTarget = entityEnderCrystal.getBeamTarget();
        if (beamTarget == null) {
            //if beam target is null, set ourselves as beam target
            entityEnderCrystal.setBeamTarget(getPos());
            this.connectedCrystalsIds.add(entityEnderCrystal.getEntityId());
        } else if (beamTarget.equals(getPos())) {
            //if beam target is ourselves, just add it to list
            this.connectedCrystalsIds.add(entityEnderCrystal.getEntityId());
        }
    }

    for (EntityDragon entityDragon : getWorld().getEntities(EntityDragon.class, EntitySelectors.IS_ALIVE)) {
        if (entityDragon.healingEnderCrystal != null && connectedCrystalsIds.contains(entityDragon.healingEnderCrystal.getEntityId())) {
            //if dragon is healing from crystal we draw energy from, reset it's healing crystal
            entityDragon.healingEnderCrystal = null;
            //if dragon is holding pattern, than deal damage and set it's phase to attack ourselves
            if (entityDragon.getPhaseManager().getCurrentPhase().getType() == PhaseList.HOLDING_PATTERN) {
                entityDragon.attackEntityFrom(DamageSource.causeExplosionDamage((EntityLivingBase) null), 10.0f);
                entityDragon.getPhaseManager().setPhase(PhaseList.CHARGING_PLAYER);
                ((PhaseChargingPlayer) entityDragon.getPhaseManager().getCurrentPhase()).setTarget(new Vec3d(getPos()));
            }
        }
    }
}
 
Example #25
Source File: EntityBurnableItem.java    From Wizardry with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public boolean isEntityInvulnerable(@Nonnull DamageSource source) {
	if (source.isFireDamage()) {
		hasBurned = true;
		return true;
	}
	return super.isEntityInvulnerable(source);
}
 
Example #26
Source File: ItemBackpack.java    From WearableBackpacks with MIT License 5 votes vote down vote up
public void damageArmor(EntityLivingBase entity, ItemStack stack,
                        DamageSource source, int damage, int slot) {
	stack.damageItem(damage, entity);
	if (!stack.isEmpty()) return;
	// If backpack breaks while equipped, call onEquippedBroken.
	IBackpack backpack = BackpackHelper.getBackpack(entity);
	if (backpack == null) return;
	backpack.getType().onEquippedBroken(entity, backpack);
}
 
Example #27
Source File: Minigun.java    From PneumaticCraft with GNU General Public License v3.0 5 votes vote down vote up
public boolean tryFireMinigun(EntityLivingBase target){
    boolean lastShotOfAmmo = false;
    if(ammo != null && (pressurizable == null || pressurizable.getPressure(stack) > 0)) {
        setMinigunTriggerTimeOut(Math.max(10, getMinigunSoundCounter()));
        if(getMinigunSpeed() == MAX_GUN_SPEED && (!requiresTarget || gunAimedAtTarget)) {
            if(!requiresTarget) target = raytraceTarget();
            lastShotOfAmmo = ammo.attemptDamageItem(1, rand);
            if(pressurizable != null) pressurizable.addAir(stack, -airUsage);
            if(target != null) {
                ItemStack potion = ItemGunAmmo.getPotion(ammo);
                if(potion != null) {
                    if(rand.nextInt(20) == 0) {
                        List<PotionEffect> effects = Items.potionitem.getEffects(potion);
                        if(effects != null) {
                            for(PotionEffect effect : effects) {
                                target.addPotionEffect(new PotionEffect(effect));
                            }
                        }
                    }
                } else {
                    target.attackEntityFrom(DamageSource.causePlayerDamage(player), Config.configMinigunDamage);
                }
            }
        }
    }
    return lastShotOfAmmo;
}
 
Example #28
Source File: EntityGuard.java    From ToroQuest with GNU General Public License v3.0 5 votes vote down vote up
public boolean attackEntityFrom(DamageSource source, float amount) {
	if (!super.attackEntityFrom(source, amount)) {
		return false;
	}

	EntityLivingBase attacker = this.getAttackTarget();
	if (attacker == null && source.getTrueSource() instanceof EntityLivingBase) {
		setAttackTarget((EntityLivingBase) source.getTrueSource());
		callForHelp((EntityLivingBase) source.getTrueSource());
	}
	return true;
}
 
Example #29
Source File: AbilityKnockback.java    From HexxitGear with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void start(EntityPlayer player) {
    List<EntityLiving> entities = player.worldObj.getEntitiesWithinAABB(EntityLiving.class, AxisAlignedBB.getBoundingBox(player.posX - 5, player.posY, player.posZ - 5, player.posX + 5, player.posY + 3, player.posZ + 5));

    for (EntityLiving entity : entities) {
        double relX = player.posX - entity.posX;
        double relZ = player.posZ - entity.posZ;

        if (!entity.equals(player)) {
            entity.attackEntityFrom(DamageSource.causePlayerDamage(player), 2);
            entity.addVelocity((relX * 0.25) * -1, 0.2, (relZ * 0.25) * -1);
        }
    }
}
 
Example #30
Source File: LivingDeathEvent.java    From Hyperium with GNU Lesser General Public License v3.0 5 votes vote down vote up
public LivingDeathEvent(@NotNull EntityLivingBase entity, @NotNull DamageSource cause) {
    Preconditions.checkNotNull(entity, "entity");
    Preconditions.checkNotNull(cause, "cause");

    this.entity = entity;
    this.cause = cause;
}