use latest Netty and Guava

This commit is contained in:
Sen 2025-03-16 17:40:47 +01:00
parent 7f32e87ef4
commit 3af1b1f5b6
463 changed files with 611 additions and 68249 deletions

View file

@ -2,7 +2,8 @@ package game.entity.npc;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
import java.util.function.Predicate;
import com.google.common.base.Predicate;
import game.Game;
import game.ai.AIRangedAttack;
@ -274,7 +275,7 @@ public abstract class EntityNPC extends EntityLiving
// this.tasks.addTask(1, new EntityAIAttackOnCollide(this, EntityLivingBase.class, 0.6D, true, true));
this.tasks.addTask(1, new EntityAINpcMate(this));
this.tasks.addTask(2, new EntityAIAvoidEntity(this, EntityLiving.class, new Predicate<EntityLiving>() {
public boolean test(EntityLiving entity) {
public boolean apply(EntityLiving entity) {
return entity != EntityNPC.this && EntityNPC.this.shouldFlee(entity);
}
}, 8.0F, 1.1D, 1.1D) {
@ -301,7 +302,7 @@ public abstract class EntityNPC extends EntityLiving
// }
});
this.tasks.addTask(3, new EntityAIAvoidEntity(this, EntityLiving.class, new Predicate<EntityLiving>() {
public boolean test(EntityLiving entity) {
public boolean apply(EntityLiving entity) {
return entity != EntityNPC.this && EntityNPC.this.shouldFlee(entity);
}
}, 8.0F, 1.1D, 1.1D) {
@ -364,7 +365,7 @@ public abstract class EntityNPC extends EntityLiving
}
});
this.targets.addTask(2, new EntityAINearestAttackableTarget(this, EntityLiving.class, 10, true, false, new Predicate<EntityLiving>() {
public boolean test(EntityLiving entity) {
public boolean apply(EntityLiving entity) {
if(entity != null && entity != EntityNPC.this && EntityNPC.this.shouldFlee(entity)) {
EntityNPC.this.setAttackTarget(null);
EntityNPC.this.fleeing = true;