use latest Netty and Guava
This commit is contained in:
parent
7f32e87ef4
commit
3af1b1f5b6
463 changed files with 611 additions and 68249 deletions
|
@ -1,13 +1,14 @@
|
|||
package game.ai;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.base.Predicates;
|
||||
|
||||
import game.entity.Entity;
|
||||
import game.entity.types.EntityLiving;
|
||||
import game.pathfinding.PathEntity;
|
||||
import game.pathfinding.PathNavigate;
|
||||
import game.util.Predicates;
|
||||
import game.world.Vec3;
|
||||
|
||||
public class EntityAIAvoidEntity<T extends Entity> extends EntityAIBase
|
||||
|
@ -38,7 +39,7 @@ public class EntityAIAvoidEntity<T extends Entity> extends EntityAIBase
|
|||
{
|
||||
this.canBeSeenSelector = new Predicate<Entity>()
|
||||
{
|
||||
public boolean test(Entity p_apply_1_)
|
||||
public boolean apply(Entity p_apply_1_)
|
||||
{
|
||||
return p_apply_1_.isEntityAlive() && EntityAIAvoidEntity.this.theEntity.getEntitySenses().canSee(p_apply_1_);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package game.ai;
|
||||
|
||||
import java.util.function.Predicate;
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.base.Predicates;
|
||||
|
||||
import game.block.BlockTallGrass;
|
||||
import game.entity.animal.EntitySheep;
|
||||
|
@ -8,7 +9,6 @@ import game.init.BlockRegistry;
|
|||
import game.init.Blocks;
|
||||
import game.init.Config;
|
||||
import game.pattern.BlockStateHelper;
|
||||
import game.util.Predicates;
|
||||
import game.world.BlockPos;
|
||||
import game.world.State;
|
||||
import game.world.World;
|
||||
|
@ -40,7 +40,7 @@ public class EntityAIEatGrass extends EntityAIBase
|
|||
else
|
||||
{
|
||||
BlockPos blockpos = new BlockPos(this.grassEaterEntity.posX, this.grassEaterEntity.posY, this.grassEaterEntity.posZ);
|
||||
return field_179505_b.test(this.entityWorld.getState(blockpos)) ? true : this.entityWorld.getState(blockpos.down()).getBlock() == Blocks.grass;
|
||||
return field_179505_b.apply(this.entityWorld.getState(blockpos)) ? true : this.entityWorld.getState(blockpos.down()).getBlock() == Blocks.grass;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ public class EntityAIEatGrass extends EntityAIBase
|
|||
{
|
||||
BlockPos blockpos = new BlockPos(this.grassEaterEntity.posX, this.grassEaterEntity.posY, this.grassEaterEntity.posZ);
|
||||
|
||||
if (field_179505_b.test(this.entityWorld.getState(blockpos)))
|
||||
if (field_179505_b.apply(this.entityWorld.getState(blockpos)))
|
||||
{
|
||||
if (Config.mobGrief)
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@ package game.ai;
|
|||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.function.Predicate;
|
||||
import com.google.common.base.Predicate;
|
||||
|
||||
import game.entity.attributes.AttributeInstance;
|
||||
import game.entity.attributes.Attributes;
|
||||
|
@ -28,7 +28,7 @@ public class EntityAIFindEntityNearest extends EntityAIBase
|
|||
|
||||
this.field_179443_c = new Predicate<EntityLiving>()
|
||||
{
|
||||
public boolean test(EntityLiving p_apply_1_)
|
||||
public boolean apply(EntityLiving p_apply_1_)
|
||||
{
|
||||
double d0 = EntityAIFindEntityNearest.this.getFollowRange();
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@ package game.ai;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import game.collect.Lists;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import game.entity.types.EntityLiving;
|
||||
import game.pathfinding.PathEntity;
|
||||
import game.pathfinding.PathNavigateGround;
|
||||
|
|
|
@ -3,7 +3,7 @@ package game.ai;
|
|||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.function.Predicate;
|
||||
import com.google.common.base.Predicate;
|
||||
|
||||
import game.entity.Entity;
|
||||
import game.entity.types.EntityLiving;
|
||||
|
@ -37,9 +37,9 @@ public class EntityAINearestAttackableTarget<T extends EntityLiving> extends Ent
|
|||
this.setMutexBits(1);
|
||||
this.targetEntitySelector = new Predicate<T>()
|
||||
{
|
||||
public boolean test(T p_apply_1_)
|
||||
public boolean apply(T p_apply_1_)
|
||||
{
|
||||
if (targetSelector != null && !targetSelector.test(p_apply_1_))
|
||||
if (targetSelector != null && !targetSelector.apply(p_apply_1_))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -2,8 +2,9 @@ package game.ai;
|
|||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
import game.block.Block;
|
||||
import game.collect.Maps;
|
||||
import game.entity.npc.EntityNPC;
|
||||
import game.init.Blocks;
|
||||
import game.init.Config;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package game.ai;
|
||||
|
||||
import java.util.function.Predicate;
|
||||
import com.google.common.base.Predicate;
|
||||
|
||||
import game.entity.types.EntityLiving;
|
||||
import game.entity.types.EntityTameable;
|
||||
|
|
|
@ -3,7 +3,7 @@ package game.ai;
|
|||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import game.collect.Lists;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
public class EntityAITasks
|
||||
{
|
||||
|
|
|
@ -2,7 +2,8 @@ package game.ai;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import game.collect.Lists;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import game.entity.Entity;
|
||||
import game.entity.types.EntityLiving;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue