mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-22 13:09:42 +00:00
Fixed fake players being able to equip baubles via right click.
This commit is contained in:
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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user