Entities (20 errors)
This commit is contained in:
parent
ac3ac8d272
commit
966f663270
|
@ -1,12 +1,14 @@
|
|||
package WayofTime.bloodmagic.entity.projectile;
|
||||
|
||||
import WayofTime.bloodmagic.api.soul.EnumDemonWillType;
|
||||
import WayofTime.bloodmagic.api.soul.PlayerDemonWillHandler;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.bloodmagic.api.soul.EnumDemonWillType;
|
||||
import WayofTime.bloodmagic.api.soul.PlayerDemonWillHandler;
|
||||
|
||||
public class EntitySentientArrow extends EntityArrow
|
||||
{
|
||||
|
@ -22,15 +24,9 @@ public class EntitySentientArrow extends EntityArrow
|
|||
super(worldIn, x, y, z);
|
||||
}
|
||||
|
||||
public EntitySentientArrow(World worldIn, EntityLivingBase shooter, EntityLivingBase p_i1755_3_, float p_i1755_4_, float p_i1755_5_)
|
||||
public EntitySentientArrow(World worldIn, EntityLivingBase shooter, double reimbursement)
|
||||
{
|
||||
super(worldIn, shooter, p_i1755_3_, p_i1755_4_, p_i1755_5_);
|
||||
|
||||
}
|
||||
|
||||
public EntitySentientArrow(World worldIn, EntityLivingBase shooter, float velocity, double reimbursement)
|
||||
{
|
||||
super(worldIn, shooter, velocity);
|
||||
this(worldIn, shooter.posX, shooter.posY, shooter.posZ);
|
||||
this.reimbursedAmountOnHit = reimbursement;
|
||||
}
|
||||
|
||||
|
@ -57,4 +53,10 @@ public class EntitySentientArrow extends EntityArrow
|
|||
|
||||
reimbursedAmountOnHit = tag.getDouble("reimbursement");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ItemStack getArrowStack()
|
||||
{
|
||||
return new ItemStack(Items.arrow);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package WayofTime.bloodmagic.entity.projectile;
|
||||
|
||||
import WayofTime.bloodmagic.registry.ModPotions;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.projectile.EntityThrowable;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.bloodmagic.registry.ModPotions;
|
||||
|
||||
public class EntitySoulSnare extends EntityThrowable
|
||||
{
|
||||
|
@ -30,16 +30,16 @@ public class EntitySoulSnare extends EntityThrowable
|
|||
* Called when this EntityThrowable hits a block or entity.
|
||||
*/
|
||||
@Override
|
||||
protected void onImpact(MovingObjectPosition mop)
|
||||
protected void onImpact(RayTraceResult result)
|
||||
{
|
||||
if (mop.entityHit != null)
|
||||
if (result.entityHit != null)
|
||||
{
|
||||
if (mop.entityHit instanceof EntityLivingBase && mop.entityHit.worldObj.rand.nextDouble() < 0.25)
|
||||
if (result.entityHit instanceof EntityLivingBase && result.entityHit.worldObj.rand.nextDouble() < 0.25)
|
||||
{
|
||||
((EntityLivingBase) mop.entityHit).addPotionEffect(new PotionEffect(ModPotions.soulSnare.id, 300, 0));
|
||||
((EntityLivingBase) result.entityHit).addPotionEffect(new PotionEffect(ModPotions.soulSnare, 300, 0));
|
||||
}
|
||||
|
||||
mop.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float) 0);
|
||||
result.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float) 0);
|
||||
}
|
||||
|
||||
for (int j = 0; j < 8; ++j)
|
||||
|
|
Loading…
Reference in a new issue