Merge pull request #2539 from Thog/fix-2537
Knights now search IMob instead of EntityMob (Fix #2537)
This commit is contained in:
commit
14a5b25d64
1 changed files with 3 additions and 2 deletions
|
@ -9,7 +9,8 @@
|
|||
package buildcraft.robots.boards;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.monster.EntityMob;
|
||||
import net.minecraft.entity.monster.IMob;
|
||||
import net.minecraft.entity.passive.EntityWolf;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemSword;
|
||||
|
||||
|
@ -48,7 +49,7 @@ public class BoardRobotKnight extends RedstoneBoardRobot {
|
|||
startDelegateAI(new AIRobotSearchEntity(robot, new IEntityFilter() {
|
||||
@Override
|
||||
public boolean matches(Entity entity) {
|
||||
return entity instanceof EntityMob;
|
||||
return (entity instanceof IMob) || (entity instanceof EntityWolf && ((EntityWolf) entity).isAngry());
|
||||
}
|
||||
}, 250, robot.getZoneToWork()));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue