AxisAlignedBB.expand -> .grow
This commit is contained in:
parent
38608e2cc2
commit
feae6c1479
@ -176,7 +176,7 @@ public class StencilModelTransformer {
|
||||
}
|
||||
|
||||
if (layersToRender.renderCovers)
|
||||
builder.addGeneralQuads(addStencilCovers(innerModel.bounds.expand(COVER_DELTA, COVER_DELTA, COVER_DELTA), canvasState.sideStates));
|
||||
builder.addGeneralQuads(addStencilCovers(innerModel.bounds.grow(COVER_DELTA), canvasState.sideStates));
|
||||
|
||||
return builder.build();
|
||||
}
|
||||
|
@ -277,7 +277,7 @@ public class EntityMagnet extends EntitySmoothMove implements IEntityAdditionalS
|
||||
}
|
||||
|
||||
protected List<Entity> detectEntityTargets() {
|
||||
AxisAlignedBB aabb = getEntityBoundingBox().expand(0.25, 0, 0.25).offset(0, -1, 0);
|
||||
AxisAlignedBB aabb = getEntityBoundingBox().grow(0.25, 0, 0.25).offset(0, -1, 0);
|
||||
return world.getEntitiesInAABBexcluding(this, aabb, createPickTargetPredicate());
|
||||
}
|
||||
|
||||
|
@ -162,8 +162,7 @@ public class TileEntityCannon extends SyncedTileEntity implements IPointable, IS
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
AxisAlignedBB box = super.getRenderBoundingBox();
|
||||
return box.expand(32.0, 32.0, 32.0);
|
||||
return super.getRenderBoundingBox().grow(32);
|
||||
}
|
||||
|
||||
private Vec3d calcMotionFromAngles() {
|
||||
|
@ -117,7 +117,7 @@ public class TileEntityFan extends SyncedTileEntity implements IPlaceAwareTile,
|
||||
|
||||
private AxisAlignedBB getEntitySearchBoundingBox() {
|
||||
AxisAlignedBB boundingBox = BlockUtils.aabbOffset(pos, 0, -2, 0, +1, +3, 1);
|
||||
return boundingBox.expand(Config.fanRange, Config.fanRange, Config.fanRange);
|
||||
return boundingBox.grow(Config.fanRange);
|
||||
}
|
||||
|
||||
private static boolean isLyingInSphericalCone(Vec3d coneAxis, Vec3d originToTarget, double halfAperture) {
|
||||
|
@ -69,7 +69,7 @@ public class TileEntityGrave extends SyncedTileEntity implements IPlaceAwareTile
|
||||
if (!world.isRemote) {
|
||||
if (Config.spawnSkeletons && world.getDifficulty() != EnumDifficulty.PEACEFUL && world.rand.nextDouble() < Config.skeletonSpawnRate) {
|
||||
|
||||
List<EntityLiving> mobs = world.getEntitiesWithinAABB(EntityLiving.class, getBB().expand(7, 7, 7), IS_MOB);
|
||||
List<EntityLiving> mobs = world.getEntitiesWithinAABB(EntityLiving.class, getBB().grow(7), IS_MOB);
|
||||
|
||||
if (mobs.size() < 5) {
|
||||
double chance = world.rand.nextDouble();
|
||||
|
@ -58,7 +58,7 @@ public class TileEntityTarget extends OpenTileEntity implements ISurfaceAttachme
|
||||
}
|
||||
|
||||
private void predictOtherProjectiles() {
|
||||
final List<Entity> projectiles = world.getEntitiesWithinAABB(Entity.class, getBB().expand(10, 10, 10), PROJECTILE_SELECTOR);
|
||||
final List<Entity> projectiles = world.getEntitiesWithinAABB(Entity.class, getBB().grow(10), PROJECTILE_SELECTOR);
|
||||
|
||||
IBlockState state = null;
|
||||
|
||||
|
@ -183,7 +183,7 @@ public class TileEntityVacuumHopper extends SyncedTileEntity implements IInvento
|
||||
spawnParticle(EnumParticleTypes.PORTAL, world.rand.nextDouble() - 0.5, world.rand.nextDouble() - 1.0, world.rand.nextDouble() - 0.5);
|
||||
}
|
||||
|
||||
List<Entity> interestingItems = world.getEntitiesWithinAABB(Entity.class, getBB().expand(3, 3, 3), entitySelector);
|
||||
List<Entity> interestingItems = world.getEntitiesWithinAABB(Entity.class, getBB().grow(3), entitySelector);
|
||||
|
||||
boolean needsSync = false;
|
||||
|
||||
|
@ -71,7 +71,7 @@ public class TileEntityVillageHighlighter extends SyncedTileEntity implements IT
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return super.getRenderBoundingBox().expand(200, 200, 200);
|
||||
return super.getRenderBoundingBox().grow(200);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -20,7 +20,7 @@ public class InvisibleMobsFlimFlam implements IFlimFlamAction {
|
||||
public boolean execute(EntityPlayerMP target) {
|
||||
final World world = target.world;
|
||||
|
||||
AxisAlignedBB around = target.getEntityBoundingBox().expand(20, 20, 20);
|
||||
AxisAlignedBB around = target.getEntityBoundingBox().grow(20);
|
||||
List<EntityLiving> mobs = world.getEntitiesWithinAABB(EntityLiving.class, around, WorldUtils.NON_PLAYER);
|
||||
|
||||
if (mobs.isEmpty()) return false;
|
||||
|
@ -24,7 +24,7 @@ public class MountFlimFlam implements IFlimFlamAction {
|
||||
public boolean execute(EntityPlayerMP target) {
|
||||
final World world = target.world;
|
||||
|
||||
AxisAlignedBB around = target.getEntityBoundingBox().expand(40, 40, 40);
|
||||
AxisAlignedBB around = target.getEntityBoundingBox().grow(40);
|
||||
List<EntityLiving> mobs = world.getEntitiesWithinAABB(EntityLiving.class, around, SAFE_SELECTOR);
|
||||
if (mobs.isEmpty()) return false;
|
||||
EntityLiving selected = CollectionUtils.getRandom(mobs);
|
||||
|
@ -17,7 +17,7 @@ public class RenameFlimFlam implements IFlimFlamAction {
|
||||
@Override
|
||||
public boolean execute(EntityPlayerMP target) {
|
||||
World world = target.world;
|
||||
AxisAlignedBB around = target.getEntityBoundingBox().expand(20, 20, 20);
|
||||
AxisAlignedBB around = target.getEntityBoundingBox().grow(20);
|
||||
List<EntityLiving> living = world.getEntitiesWithinAABB(EntityLiving.class, around, WorldUtils.NON_PLAYER);
|
||||
|
||||
Collections.shuffle(living);
|
||||
|
@ -18,7 +18,7 @@ public class SheepDyeFlimFlam implements IFlimFlamAction {
|
||||
@Override
|
||||
public boolean execute(EntityPlayerMP target) {
|
||||
World world = target.world;
|
||||
AxisAlignedBB around = target.getEntityBoundingBox().expand(20, 20, 20);
|
||||
AxisAlignedBB around = target.getEntityBoundingBox().grow(20);
|
||||
List<EntitySheep> sheeps = world.getEntitiesWithinAABB(EntitySheep.class, around);
|
||||
if (sheeps.isEmpty()) return false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user