Fixed fake players being able to equip baubles via right click.

This commit is contained in:
Lizbeth Rika committed 2015-02-21 15:41:10 +00:00
1 parent dd5ae937d5
commit f4f383d30a
2 files changed
+7 -6

No files matched your search

@@ -243,17 +243,14 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
@Override
public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) {
if((par1DamageSource.damageType.equals("player") || par1DamageSource.getEntity() instanceof EntityPixie) && par1DamageSource.getEntity() != null && !isTruePlayer(par1DamageSource.getEntity()) && getInvulTime() == 0)
if((par1DamageSource.damageType.equals("player") || par1DamageSource.getEntity() instanceof EntityPixie) && par1DamageSource.getEntity() != null && isTruePlayer(par1DamageSource.getEntity()) && getInvulTime() == 0)
return super.attackEntityFrom(par1DamageSource, par2 * (isHardMode() ? 0.6F : 1F));
return false;
}
public boolean isTruePlayer(Entity e) {
if(e instanceof EntityPlayer)
public static boolean isTruePlayer(Entity e) {
if(!(e instanceof EntityPlayer))
return false;
if(worldObj.isRemote)
return true;
EntityPlayer player = (EntityPlayer) e;