mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-20 04:09:40 +00:00
Fixed Excaliber only homing on players when it should home on anything but players. Also made it only home on mobs. Closes #958
This commit is contained in:
1 parent
f92eb3df3b
commit
4ba87831db
1 file changed
+2
-1
@@ -16,6 +16,7 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.entity.monster.IMob;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityThrowable;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
@@ -162,7 +163,7 @@ public class ItemExcaliber extends ItemManasteelSword implements IRelic, ILensEf
|
||||
AxisAlignedBB axis1 = AxisAlignedBB.getBoundingBox(entity.posX, entity.posY, entity.posZ, entity.lastTickPosX, entity.lastTickPosY, entity.lastTickPosZ).expand(5, 5, 5);
|
||||
List<EntityLivingBase> entities = entity.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axis1);
|
||||
for(EntityLivingBase living : entities) {
|
||||
if(!(living instanceof EntityPlayer) && living.hurtTime != 0)
|
||||
if(living instanceof EntityPlayer || !(living instanceof IMob) || living.hurtTime != 0)
|
||||
continue;
|
||||
|
||||
homeID = living.getEntityId();
|
||||
|
||||
Reference in new issue
Block a user