Rename to getLivingWithinRadius for clarity
This commit is contained in:
@@ -46,7 +46,7 @@ public class ChainLightning extends SpellRay {
|
||||
* modifiers.get(SpellModifiers.POTENCY));
|
||||
|
||||
// Secondary chaining effect
|
||||
List<EntityLivingBase> secondaryTargets = EntityUtils.getEntitiesWithinRadius(
|
||||
List<EntityLivingBase> secondaryTargets = EntityUtils.getLivingWithinRadius(
|
||||
getProperty(SECONDARY_RANGE).doubleValue(), target.posX, target.posY + target.height / 2, target.posZ, world);
|
||||
|
||||
secondaryTargets.remove(target);
|
||||
@@ -62,7 +62,7 @@ public class ChainLightning extends SpellRay {
|
||||
|
||||
// Tertiary chaining effect
|
||||
|
||||
List<EntityLivingBase> tertiaryTargets = EntityUtils.getEntitiesWithinRadius(
|
||||
List<EntityLivingBase> tertiaryTargets = EntityUtils.getLivingWithinRadius(
|
||||
getProperty(TERTIARY_RANGE).doubleValue(), secondaryTarget.posX,
|
||||
secondaryTarget.posY + secondaryTarget.height / 2, secondaryTarget.posZ, world);
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public class Detonate extends SpellRay {
|
||||
|
||||
if(!world.isRemote){
|
||||
|
||||
List<EntityLivingBase> targets = EntityUtils.getEntitiesWithinRadius(getProperty(BLAST_RADIUS).doubleValue()
|
||||
List<EntityLivingBase> targets = EntityUtils.getLivingWithinRadius(getProperty(BLAST_RADIUS).doubleValue()
|
||||
* modifiers.get(WizardryItems.blast_upgrade), pos.getX(), pos.getY(), pos.getZ(), world);
|
||||
|
||||
for(EntityLivingBase target : targets){
|
||||
|
||||
@@ -23,7 +23,7 @@ public class GroupHeal extends Spell {
|
||||
|
||||
boolean flag = false;
|
||||
|
||||
List<EntityLivingBase> targets = EntityUtils.getEntitiesWithinRadius(getProperty(EFFECT_RADIUS).floatValue()
|
||||
List<EntityLivingBase> targets = EntityUtils.getLivingWithinRadius(getProperty(EFFECT_RADIUS).floatValue()
|
||||
* modifiers.get(WizardryItems.blast_upgrade), caster.posX, caster.posY, caster.posZ, world);
|
||||
|
||||
for(EntityLivingBase target : targets){
|
||||
|
||||
@@ -39,7 +39,7 @@ public class IceAge extends Spell {
|
||||
|
||||
float radius = getProperty(EFFECT_RADIUS).floatValue() * modifiers.get(WizardryItems.blast_upgrade);
|
||||
|
||||
List<EntityLivingBase> targets = EntityUtils.getEntitiesWithinRadius(radius, caster.posX, caster.posY, caster.posZ, world);
|
||||
List<EntityLivingBase> targets = EntityUtils.getLivingWithinRadius(radius, caster.posX, caster.posY, caster.posZ, world);
|
||||
|
||||
for(EntityLivingBase target : targets){
|
||||
if(AllyDesignationSystem.isValidTarget(caster, target)){
|
||||
|
||||
@@ -38,7 +38,7 @@ public class LightningPulse extends Spell {
|
||||
|
||||
if(caster.onGround){
|
||||
|
||||
List<EntityLivingBase> targets = EntityUtils.getEntitiesWithinRadius(
|
||||
List<EntityLivingBase> targets = EntityUtils.getLivingWithinRadius(
|
||||
getProperty(EFFECT_RADIUS).floatValue() * modifiers.get(WizardryItems.blast_upgrade),
|
||||
caster.posX, caster.posY, caster.posZ, world);
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ public class LightningWeb extends SpellRay {
|
||||
|
||||
// Secondary chaining effect
|
||||
|
||||
List<EntityLivingBase> secondaryTargets = EntityUtils.getEntitiesWithinRadius(
|
||||
List<EntityLivingBase> secondaryTargets = EntityUtils.getLivingWithinRadius(
|
||||
getProperty(SECONDARY_RANGE).floatValue(), target.posX, target.posY + target.height / 2,
|
||||
target.posZ, world);
|
||||
|
||||
@@ -77,7 +77,7 @@ public class LightningWeb extends SpellRay {
|
||||
|
||||
// Tertiary chaining effect
|
||||
|
||||
List<EntityLivingBase> tertiaryTargets = EntityUtils.getEntitiesWithinRadius(
|
||||
List<EntityLivingBase> tertiaryTargets = EntityUtils.getLivingWithinRadius(
|
||||
getProperty(TERTIARY_RANGE).floatValue(), secondaryTarget.posX,
|
||||
secondaryTarget.posY + secondaryTarget.height / 2, secondaryTarget.posZ, world);
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ public class MindControl extends SpellRay {
|
||||
// As of 1.1, this now uses the creature's follow range, like normal targeting. It also
|
||||
// no longer lasts until the creature dies; instead it is a potion effect which continues to
|
||||
// set the target until it wears off.
|
||||
List<EntityLivingBase> possibleTargets = EntityUtils.getEntitiesWithinRadius(
|
||||
List<EntityLivingBase> possibleTargets = EntityUtils.getLivingWithinRadius(
|
||||
target.getEntityAttribute(SharedMonsterAttributes.FOLLOW_RANGE).getAttributeValue(),
|
||||
target.posX, target.posY, target.posZ, world);
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ public class PlagueOfDarkness extends Spell {
|
||||
|
||||
double radius = getProperty(EFFECT_RADIUS).floatValue() * modifiers.get(WizardryItems.blast_upgrade);
|
||||
|
||||
List<EntityLivingBase> targets = EntityUtils.getEntitiesWithinRadius(radius, caster.posX, caster.posY, caster.posZ, world);
|
||||
List<EntityLivingBase> targets = EntityUtils.getLivingWithinRadius(radius, caster.posX, caster.posY, caster.posZ, world);
|
||||
|
||||
for(EntityLivingBase target : targets){
|
||||
if(AllyDesignationSystem.isValidTarget(caster, target)
|
||||
@@ -75,8 +75,7 @@ public class PlagueOfDarkness extends Spell {
|
||||
.clr(0.8f, 0, 0.05f)
|
||||
.spawn(world);
|
||||
}
|
||||
|
||||
caster.swingArm(hand);
|
||||
|
||||
this.playSound(world, caster, ticksInUse, -1, modifiers);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public class Shockwave extends Spell {
|
||||
|
||||
double radius = getProperty(BLAST_RADIUS).floatValue() * modifiers.get(WizardryItems.blast_upgrade);
|
||||
|
||||
List<EntityLivingBase> targets = EntityUtils.getEntitiesWithinRadius(radius, caster.posX, caster.posY, caster.posZ, world);
|
||||
List<EntityLivingBase> targets = EntityUtils.getLivingWithinRadius(radius, caster.posX, caster.posY, caster.posZ, world);
|
||||
|
||||
for(EntityLivingBase target : targets){
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public class ShulkerBullet extends Spell {
|
||||
|
||||
double range = getProperty(RANGE).floatValue() * modifiers.get(WizardryItems.range_upgrade);
|
||||
|
||||
List<EntityLivingBase> possibleTargets = EntityUtils.getEntitiesWithinRadius(range, x, y, z, world);
|
||||
List<EntityLivingBase> possibleTargets = EntityUtils.getLivingWithinRadius(range, x, y, z, world);
|
||||
|
||||
possibleTargets.remove(caster);
|
||||
possibleTargets.removeIf(t -> t instanceof EntityArmorStand);
|
||||
|
||||
@@ -77,7 +77,7 @@ public class Thunderstorm extends Spell {
|
||||
// entityNBT.setInteger("summoningPlayer", entityplayer.entityId);
|
||||
|
||||
// Secondary chaining effect
|
||||
List<EntityLivingBase> secondaryTargets = EntityUtils.getEntitiesWithinRadius(
|
||||
List<EntityLivingBase> secondaryTargets = EntityUtils.getLivingWithinRadius(
|
||||
getProperty(SECONDARY_RANGE).doubleValue(), x, y + 1, z, world);
|
||||
|
||||
for(int j = 0; j < Math.min(secondaryTargets.size(), getProperty(SECONDARY_MAX_TARGETS).intValue()); j++){
|
||||
@@ -102,7 +102,7 @@ public class Thunderstorm extends Spell {
|
||||
|
||||
// Tertiary chaining effect
|
||||
|
||||
List<EntityLivingBase> tertiaryTargets = EntityUtils.getEntitiesWithinRadius(
|
||||
List<EntityLivingBase> tertiaryTargets = EntityUtils.getLivingWithinRadius(
|
||||
getProperty(TERTIARY_RANGE).doubleValue(), secondaryTarget.posX,
|
||||
secondaryTarget.posY + secondaryTarget.height / 2, secondaryTarget.posZ, world);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user