Initial stab at 1.11
About halfway.
This commit is contained in:
parent
ce52aea512
commit
00d6f8eb46
157 changed files with 1036 additions and 1554 deletions
|
@ -37,12 +37,12 @@ public class EntityAIAttackRangedBow extends EntityAIBase
|
|||
*/
|
||||
public boolean shouldExecute()
|
||||
{
|
||||
return this.entity.getAttackTarget() == null ? false : this.isBowInMainhand();
|
||||
return this.entity.getAttackTarget() != null && this.isBowInMainhand();
|
||||
}
|
||||
|
||||
protected boolean isBowInMainhand()
|
||||
{
|
||||
return this.entity.getHeldItemMainhand() != null && this.entity.getHeldItemMainhand().getItem() instanceof ItemBow;
|
||||
return this.entity.getHeldItemMainhand().getItem() instanceof ItemBow;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -37,7 +37,7 @@ public class EntityAIAttackStealthMelee extends EntityAIBase
|
|||
public EntityAIAttackStealthMelee(EntityCorruptedChicken creature, double speedIn, boolean useLongMemory)
|
||||
{
|
||||
this.chicken = creature;
|
||||
this.worldObj = creature.worldObj;
|
||||
this.worldObj = creature.getEntityWorld();
|
||||
this.speedTowardsTarget = speedIn;
|
||||
this.longMemory = useLongMemory;
|
||||
this.setMutexBits(3);
|
||||
|
|
|
@ -20,7 +20,7 @@ public class EntityAIEatAndCorruptBlock extends EntityAIBase
|
|||
public EntityAIEatAndCorruptBlock(EntityAspectedDemonBase entity)
|
||||
{
|
||||
this.grassEaterEntity = entity;
|
||||
this.world = entity.worldObj;
|
||||
this.world = entity.getEntityWorld();
|
||||
this.setMutexBits(7);
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ public class EntityAIFollowOwner extends EntityAIBase
|
|||
public EntityAIFollowOwner(EntityDemonBase thePetIn, double followSpeedIn, float minDistIn, float maxDistIn)
|
||||
{
|
||||
this.thePet = thePetIn;
|
||||
this.theWorld = thePetIn.worldObj;
|
||||
this.theWorld = thePetIn.getEntityWorld();
|
||||
this.followSpeed = followSpeedIn;
|
||||
this.petPathfinder = thePetIn.getNavigator();
|
||||
this.minDist = minDistIn;
|
||||
|
@ -100,7 +100,7 @@ public class EntityAIFollowOwner extends EntityAIBase
|
|||
{
|
||||
IBlockState iblockstate = this.theWorld.getBlockState(pos);
|
||||
Block block = iblockstate.getBlock();
|
||||
return block == Blocks.AIR ? true : !iblockstate.isFullCube();
|
||||
return block == Blocks.AIR || !iblockstate.isFullCube();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -122,9 +122,9 @@ public class EntityAIFollowOwner extends EntityAIBase
|
|||
{
|
||||
if (this.thePet.getDistanceSqToEntity(this.theOwner) >= 144.0D)
|
||||
{
|
||||
int i = MathHelper.floor_double(this.theOwner.posX) - 2;
|
||||
int j = MathHelper.floor_double(this.theOwner.posZ) - 2;
|
||||
int k = MathHelper.floor_double(this.theOwner.getEntityBoundingBox().minY);
|
||||
int i = MathHelper.floor(this.theOwner.posX) - 2;
|
||||
int j = MathHelper.floor(this.theOwner.posZ) - 2;
|
||||
int k = MathHelper.floor(this.theOwner.getEntityBoundingBox().minY);
|
||||
|
||||
for (int l = 0; l <= 4; ++l)
|
||||
{
|
||||
|
|
|
@ -32,7 +32,7 @@ public class EntityAIGrabEffectsFromOwner extends EntityAIBase
|
|||
public EntityAIGrabEffectsFromOwner(EntitySentientSpecter thePetIn, double followSpeedIn, float minDistIn)
|
||||
{
|
||||
this.thePet = thePetIn;
|
||||
this.theWorld = thePetIn.worldObj;
|
||||
this.theWorld = thePetIn.getEntityWorld();
|
||||
this.followSpeed = followSpeedIn;
|
||||
this.petPathfinder = thePetIn.getNavigator();
|
||||
this.minDist = minDistIn;
|
||||
|
@ -105,7 +105,7 @@ public class EntityAIGrabEffectsFromOwner extends EntityAIBase
|
|||
{
|
||||
IBlockState iblockstate = this.theWorld.getBlockState(pos);
|
||||
Block block = iblockstate.getBlock();
|
||||
return block == Blocks.AIR ? true : !iblockstate.isFullCube();
|
||||
return block == Blocks.AIR || !iblockstate.isFullCube();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -135,9 +135,9 @@ public class EntityAIGrabEffectsFromOwner extends EntityAIBase
|
|||
{
|
||||
if (this.thePet.getDistanceSqToEntity(this.theOwner) >= 144.0D)
|
||||
{
|
||||
int i = MathHelper.floor_double(this.theOwner.posX) - 2;
|
||||
int j = MathHelper.floor_double(this.theOwner.posZ) - 2;
|
||||
int k = MathHelper.floor_double(this.theOwner.getEntityBoundingBox().minY);
|
||||
int i = MathHelper.floor(this.theOwner.posX) - 2;
|
||||
int j = MathHelper.floor(this.theOwner.posZ) - 2;
|
||||
int k = MathHelper.floor(this.theOwner.getEntityBoundingBox().minY);
|
||||
|
||||
for (int l = 0; l <= 4; ++l)
|
||||
{
|
||||
|
|
|
@ -40,7 +40,7 @@ public class EntityAIPickUpAlly extends EntityAIBase
|
|||
public EntityAIPickUpAlly(EntityAspectedDemonBase creature, double speedIn, boolean useLongMemory)
|
||||
{
|
||||
this.entity = creature;
|
||||
this.worldObj = creature.worldObj;
|
||||
this.worldObj = creature.getEntityWorld();
|
||||
this.speedTowardsTarget = speedIn;
|
||||
this.longMemory = useLongMemory;
|
||||
this.setMutexBits(3);
|
||||
|
@ -57,7 +57,7 @@ public class EntityAIPickUpAlly extends EntityAIBase
|
|||
}
|
||||
|
||||
AxisAlignedBB bb = new AxisAlignedBB(entity.posX - 0.5, entity.posY - 0.5, entity.posZ - 0.5, entity.posX + 0.5, entity.posY + 0.5, entity.posZ + 0.5).expandXyz(5);
|
||||
List<EntityLivingBase> list = this.entity.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, bb, new EntityAspectedDemonBase.WillTypePredicate(entity.getType()));
|
||||
List<EntityLivingBase> list = this.entity.getEntityWorld().getEntitiesWithinAABB(EntityLivingBase.class, bb, new EntityAspectedDemonBase.WillTypePredicate(entity.getType()));
|
||||
for (EntityLivingBase testEntity : list)
|
||||
{
|
||||
if (testEntity != this.entity)
|
||||
|
|
|
@ -21,7 +21,7 @@ public class EntityAIProtectAlly extends EntityAIBase
|
|||
public EntityAIProtectAlly(EntityCorruptedSheep entity)
|
||||
{
|
||||
this.entity = entity;
|
||||
this.world = entity.worldObj;
|
||||
this.world = entity.getEntityWorld();
|
||||
this.setMutexBits(7);
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ public class EntityAIRetreatToHeal<T extends Entity> extends EntityAIBase
|
|||
}
|
||||
|
||||
//This part almost doesn't matter
|
||||
List<T> list = this.theEntity.worldObj.<T>getEntitiesWithinAABB(this.classToAvoid, this.theEntity.getEntityBoundingBox().expand((double) this.avoidDistance, 3.0D, (double) this.avoidDistance), Predicates.and(new Predicate[] { EntitySelectors.CAN_AI_TARGET, this.canBeSeenSelector, this.avoidTargetSelector }));
|
||||
List<T> list = this.theEntity.getEntityWorld().<T>getEntitiesWithinAABB(this.classToAvoid, this.theEntity.getEntityBoundingBox().expand((double) this.avoidDistance, 3.0D, (double) this.avoidDistance), Predicates.and(new Predicate[] { EntitySelectors.CAN_AI_TARGET, this.canBeSeenSelector, this.avoidTargetSelector }));
|
||||
|
||||
if (list.isEmpty())
|
||||
{
|
||||
|
|
|
@ -82,7 +82,7 @@ public class EntityAIStealthRetreat extends EntityAIBase
|
|||
@Override
|
||||
public void startExecuting()
|
||||
{
|
||||
ticksLeft = this.entity.worldObj.rand.nextInt(100) + 100;
|
||||
ticksLeft = this.entity.getEntityWorld().rand.nextInt(100) + 100;
|
||||
this.entityPathNavigate.setPath(this.entityPathEntity, this.farSpeed);
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ public class EntityAIStealthTowardsTarget extends EntityAIBase
|
|||
return false;
|
||||
} else
|
||||
{
|
||||
ticksLeft = this.entity.worldObj.rand.nextInt(200) + 100;
|
||||
ticksLeft = this.entity.getEntityWorld().rand.nextInt(200) + 100;
|
||||
this.xPosition = vec3d.xCoord;
|
||||
this.yPosition = vec3d.yCoord;
|
||||
this.zPosition = vec3d.zCoord;
|
||||
|
@ -75,7 +75,7 @@ public class EntityAIStealthTowardsTarget extends EntityAIBase
|
|||
if (this.entity.getNavigator().noPath())
|
||||
{
|
||||
EntityLivingBase target = this.entity.getAttackTarget();
|
||||
Vec3d vec3d = null;
|
||||
Vec3d vec3d;
|
||||
if (target instanceof EntityCreature)
|
||||
{
|
||||
vec3d = RandomPositionGenerator.findRandomTarget((EntityCreature) target, 10, 7);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue