Snares can no longer hit the thrower of the snare within 20 ticks of throwing it (#745)

Added the "Diseased" upgrade, which vastly decreases healing potency.
This commit is contained in:
WayofTime 2016-11-11 10:42:56 -05:00
parent 33b799723c
commit fb38c2e8b8
8 changed files with 123 additions and 6 deletions

View file

@ -32,7 +32,12 @@ public class EntitySoulSnare extends EntityThrowable
@Override
protected void onImpact(RayTraceResult result)
{
if (result.entityHit != null)
if (result.entityHit == this.getThrower() && this.ticksExisted < 20)
{
return;
}
if (result.entityHit != null && result.entityHit != this.getThrower())
{
if (result.entityHit instanceof EntityLivingBase && result.entityHit.worldObj.rand.nextDouble() < 0.25)
{