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.animal;
import java.util.List;
import game.collect.Lists;
import com.google.common.collect.Lists;
import game.entity.DamageSource;
import game.entity.Entity;
import game.entity.npc.Alignment;

View file

@ -1,6 +1,6 @@
package game.entity.animal;
import java.util.function.Predicate;
import com.google.common.base.Predicate;
import game.ai.EntityAIFollowParent;
import game.ai.EntityAILookIdle;
@ -44,7 +44,7 @@ public class EntityHorse extends EntityAnimal implements IInvBasic
{
private static final Predicate<Entity> horseBreedingSelector = new Predicate<Entity>()
{
public boolean test(Entity p_apply_1_)
public boolean apply(Entity p_apply_1_)
{
return p_apply_1_ instanceof EntityHorse && ((EntityHorse)p_apply_1_).isBreeding();
}

View file

@ -1,6 +1,6 @@
package game.entity.animal;
import java.util.function.Predicate;
import com.google.common.base.Predicate;
import game.ai.EntityAIAvoidEntity;
import game.ai.EntityAIFollowOwner;
@ -56,7 +56,7 @@ public class EntityOcelot extends EntityTameable
this.tasks.addTask(10, new EntityAIWander(this, 0.8D));
this.tasks.addTask(11, new EntityAIWatchClosest(this, null, 10.0F));
this.targets.addTask(1, new EntityAITargetNonTamed(this, EntityAnimal.class, false, new Predicate<EntityAnimal>() {
public boolean test(EntityAnimal entity) {
public boolean apply(EntityAnimal entity) {
return entity instanceof EntityChicken || entity instanceof EntityMouse;
}
}));

View file

@ -1,6 +1,6 @@
package game.entity.animal;
import java.util.function.Predicate;
import com.google.common.base.Predicate;
import game.ai.EntityAIAttackOnCollide;
import game.ai.EntityAIAvoidEntity;
@ -336,7 +336,7 @@ public class EntityRabbit extends EntityAnimal {
this.grow(this.rand.range(250, 350));
if(Config.rabbitMateChance > 0 && this.rand.chance(Config.rabbitMateChance) && this.getGrowingAge() == 0 && !this.isInLove() &&
!this.worldObj.getEntitiesWithinAABB(EntityRabbit.class, this.getEntityBoundingBox().expand(15.0f, 15.0f, 15.0f), new Predicate<EntityRabbit>() {
public boolean test(EntityRabbit entity) {
public boolean apply(EntityRabbit entity) {
return entity != EntityRabbit.this && entity.getGrowingAge() == 0;
}
}).isEmpty())

View file

@ -2,6 +2,8 @@ package game.entity.animal;
import java.util.Map;
import com.google.common.collect.Maps;
import game.ai.EntityAIEatGrass;
import game.ai.EntityAIFollowParent;
import game.ai.EntityAILookIdle;
@ -12,7 +14,6 @@ import game.ai.EntityAITempt;
import game.ai.EntityAIWander;
import game.ai.EntityAIWatchClosest;
import game.biome.Biome;
import game.collect.Maps;
import game.color.DyeColor;
import game.entity.attributes.Attributes;
import game.entity.item.EntityItem;

View file

@ -1,6 +1,6 @@
package game.entity.animal;
import java.util.function.Predicate;
import com.google.common.base.Predicate;
import game.ai.EntityAIAttackOnCollide;
import game.ai.EntityAIBeg;
@ -74,7 +74,7 @@ public class EntityWolf extends EntityTameable
this.targets.addTask(3, new EntityAIHurtByTarget(this, true));
this.targets.addTask(4, new EntityAITargetNonTamed(this, EntityAnimal.class, false, new Predicate<Entity>()
{
public boolean test(Entity p_apply_1_)
public boolean apply(Entity p_apply_1_)
{
return p_apply_1_ instanceof EntitySheep || p_apply_1_ instanceof EntityRabbit;
}