Open ScarletRedMan opened 2 years ago
This is:
Methods canTarget() and targetOption() don't working.I created new zombie class with overrided these methods and zombie want not to attack villagers.
canTarget()
targetOption()
Code;
@Override public boolean canTarget(Entity entity) { return entity instanceof Villager || entity instanceof Player; } @Override public boolean targetOption(EntityCreature creature, double distance) { if(distance > 100D || creature.isClosed() || !creature.isAlive()) return false; return creature instanceof Villager || (creature instanceof Player && !((Player) creature).isCreative()); }
Info
This is:
Your issue / suggestion
Methods
canTarget()
andtargetOption()
don't working.I created new zombie class with overrided these methods and zombie want not to attack villagers.Code;