bluefire details

* Fix error where BlueFireAbility had Combustion as the element
* Improve Add and Remove commands tab completers
* Remove smoke particles from fire abilities (except jetblaze)
This commit is contained in:
Simp 2020-06-26 18:30:39 -04:00
parent e9d663c456
commit 448a5f7292
11 changed files with 18 additions and 67 deletions

View file

@ -59,7 +59,7 @@ public class Element {
public static final SubElement COMBUSTION = new SubElement("Combustion", FIRE);
public static final SubElement BLUE_FIRE = new SubElement("Blue Fire", FIRE);
private static final Element[] ELEMENTS = { AIR, WATER, EARTH, FIRE, CHI, FLIGHT, SPIRITUAL, BLOOD, HEALING, ICE, PLANT, LAVA, METAL, SAND, LIGHTNING, COMBUSTION };
private static final Element[] ELEMENTS = { AIR, WATER, EARTH, FIRE, CHI, FLIGHT, SPIRITUAL, BLOOD, HEALING, ICE, PLANT, LAVA, METAL, SAND, LIGHTNING, COMBUSTION, BLUE_FIRE };
private static final Element[] MAIN_ELEMENTS = { AIR, WATER, EARTH, FIRE, CHI };
private static final SubElement[] SUB_ELEMENTS = { FLIGHT, SPIRITUAL, BLOOD, HEALING, ICE, PLANT, LAVA, METAL, SAND, LIGHTNING, COMBUSTION, BLUE_FIRE };

View file

@ -17,7 +17,7 @@ public abstract class BlueFireAbility extends FireAbility implements SubAbility
@Override
public Element getElement() {
return Element.COMBUSTION;
return Element.BLUE_FIRE;
}
}

View file

@ -242,29 +242,11 @@ public class AddCommand extends PKCommand {
}
final List<String> l = new ArrayList<String>();
if (args.size() == 0) {
l.add("Air");
l.add("Earth");
l.add("Fire");
l.add("Water");
l.add("Chi");
for (final Element e : Element.getAddonElements()) {
l.add(e.getName());
for (Element e : Element.getAllElements()) {
l.add(e.getName().replace(" ", ""));
}
l.add("Blood");
l.add("Combustion");
l.add("Flight");
l.add("Healing");
l.add("Ice");
l.add("Lava");
l.add("Lightning");
l.add("Metal");
l.add("Plant");
l.add("Sand");
l.add("Spiritual");
for (final SubElement e : Element.getAddonSubElements()) {
l.add(e.getName());
for (Element e : Element.getAllSubElements()) {
l.add(e.getName().replace(" ", ""));
}
} else {
for (final Player p : Bukkit.getOnlinePlayers()) {

View file

@ -156,33 +156,21 @@ public class RemoveCommand extends PKCommand {
}
final List<String> l = new ArrayList<String>();
if (args.size() == 0) {
for (Element e : Element.getAllElements()) {
l.add(e.getName().replace(" ", ""));
}
for (Element e : Element.getAllSubElements()) {
l.add(e.getName().replace(" ", ""));
}
for (final Player p : Bukkit.getOnlinePlayers()) {
l.add(p.getName());
}
} else {
l.add("Air");
l.add("Earth");
l.add("Fire");
l.add("Water");
l.add("Chi");
for (final Element e : Element.getAddonElements()) {
l.add(e.getName());
for (Element e : Element.getAllElements()) {
l.add(e.getName().replace(" ", ""));
}
l.add("Blood");
l.add("Combustion");
l.add("Flight");
l.add("Healing");
l.add("Ice");
l.add("Lava");
l.add("Lightning");
l.add("Metal");
l.add("Plant");
l.add("Sand");
l.add("Spiritual");
for (final SubElement e : Element.getAddonSubElements()) {
l.add(e.getName());
for (Element e : Element.getAllSubElements()) {
l.add(e.getName().replace(" ", ""));
}
}
return l;

View file

@ -23,7 +23,6 @@ import com.projectkorra.projectkorra.attribute.Attribute;
import com.projectkorra.projectkorra.avatar.AvatarState;
import com.projectkorra.projectkorra.command.Commands;
import com.projectkorra.projectkorra.util.DamageHandler;
import com.projectkorra.projectkorra.util.ParticleEffect;
import com.projectkorra.projectkorra.waterbending.plant.PlantRegrowth;
public class FireBlast extends FireAbility {
@ -52,7 +51,6 @@ public class FireBlast extends FireAbility {
@Attribute(Attribute.KNOCKBACK)
private double knockback;
private double flameRadius;
private double smokeRadius;
private Random random;
private Location location;
private Location origin;
@ -115,19 +113,16 @@ public class FireBlast extends FireAbility {
this.fireTicks = getConfig().getDouble("Abilities.Fire.FireBlast.FireTicks");
this.knockback = getConfig().getDouble("Abilities.Fire.FireBlast.Knockback");
this.flameRadius = getConfig().getDouble("Abilities.Fire.FireBlast.FlameParticleRadius");
this.smokeRadius = getConfig().getDouble("Abilities.Fire.FireBlast.SmokeParticleRadius");
this.random = new Random();
}
private void advanceLocation() {
if (this.isFireBurst) {
this.flameRadius += 0.06;
this.smokeRadius += 0.06;
}
if (this.showParticles) {
playFirebendingParticles(this.location, 12, this.flameRadius, this.flameRadius, this.flameRadius);
ParticleEffect.SMOKE_NORMAL.display(this.location, 2, this.smokeRadius, this.smokeRadius, this.smokeRadius);
}
if (GeneralMethods.checkDiagonalWall(this.location, this.direction)) {
@ -217,7 +212,7 @@ public class FireBlast extends FireAbility {
Entity target = GeneralMethods.getTargetedEntity(player, range);
if (target != null) {
this.direction.add(GeneralMethods.getDirection(location, target.getLocation().add(0, 1, 0)).normalize().multiply(0.025));
this.direction.add(GeneralMethods.getDirection(location, target.getLocation().add(0, 1, 0)).normalize().multiply(0.04));
}
this.advanceLocation();
}

View file

@ -6,7 +6,6 @@ import java.util.Random;
import java.util.concurrent.ConcurrentHashMap;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.block.Block;
import org.bukkit.entity.Entity;
@ -207,7 +206,6 @@ public class FireBlastCharged extends FireAbility {
private void executeFireball() {
for (final Block block : GeneralMethods.getBlocksAroundPoint(this.location, this.collisionRadius)) {
playFirebendingParticles(block.getLocation(), 5, 0.5, 0.5, 0.5);
ParticleEffect.SMOKE_NORMAL.display(block.getLocation(), 2, 0.5, 0.5, 0.5, 0);
if ((new Random()).nextInt(4) == 0) {
playFirebendingSound(this.location);
}

View file

@ -15,7 +15,6 @@ import com.projectkorra.projectkorra.ability.ElementalAbility;
import com.projectkorra.projectkorra.ability.FireAbility;
import com.projectkorra.projectkorra.airbending.AirSpout;
import com.projectkorra.projectkorra.attribute.Attribute;
import com.projectkorra.projectkorra.util.ParticleEffect;
import com.projectkorra.projectkorra.util.VelocityBuilder;
public class FireJet extends FireAbility {
@ -96,7 +95,6 @@ public class FireJet extends FireAbility {
}
playFirebendingParticles(this.player.getLocation(), 20, 0.6, 0.6, 0.6);
ParticleEffect.SMOKE_NORMAL.display(this.player.getLocation(), 10, 0.6, 0.6, 0.6);
double timefactor;
if (this.bPlayer.isAvatarState() && this.avatarStateToggled) {

View file

@ -15,7 +15,6 @@ import org.bukkit.util.Vector;
import com.projectkorra.projectkorra.GeneralMethods;
import com.projectkorra.projectkorra.ability.FireAbility;
import com.projectkorra.projectkorra.util.DamageHandler;
import com.projectkorra.projectkorra.util.ParticleEffect;
public class FireManipulation extends FireAbility {
@ -114,7 +113,6 @@ public class FireManipulation extends FireAbility {
return;
}
playFirebendingParticles(point, 12, 0.25, 0.25, 0.25);
ParticleEffect.SMOKE_NORMAL.display(point, 6, 0.25, 0.25, 0.25);
for (final Entity entity : GeneralMethods.getEntitiesAroundPoint(point, 1.2D)) {
if (entity instanceof LivingEntity && entity.getUniqueId() != this.player.getUniqueId()) {
DamageHandler.damageEntity(entity, this.shieldDamage, this);
@ -144,7 +142,6 @@ public class FireManipulation extends FireAbility {
final Vector direction = this.focalPoint.toVector().subtract(point.toVector());
point.add(direction.clone().multiply(this.streamSpeed / 5));
playFirebendingParticles(point, this.shieldParticles, 0.25, 0.25, 0.25);
ParticleEffect.SMOKE_NORMAL.display(point, this.shieldParticles / 2, 0.25, 0.25, 0.25);
}
} else {
Vector direction = this.player.getLocation().getDirection().clone();
@ -174,7 +171,6 @@ public class FireManipulation extends FireAbility {
}
playFirebendingParticles(this.shotPoint, this.streamParticles, 0.5, 0.5, 0.5);
ParticleEffect.SMOKE_NORMAL.display(this.shotPoint, this.streamParticles / 2, 0.5, 0.5, 0.5, 0.01);
for (final Entity entity : GeneralMethods.getEntitiesAroundPoint(this.shotPoint, 2)) {
if (entity instanceof LivingEntity && entity.getUniqueId() != this.player.getUniqueId()) {
DamageHandler.damageEntity(entity, this.streamDamage, this);

View file

@ -168,9 +168,6 @@ public class FireShield extends FireAbility {
for (double theta = 0; theta < 360; theta += 20) {
final Vector vector = GeneralMethods.getOrthogonalVector(direction, theta, this.discRadius / 1.5);
final Location display = this.location.add(vector);
if (this.random.nextInt(6) == 0) {
ParticleEffect.SMOKE_NORMAL.display(display, 1, 0, 0, 0);
}
playFirebendingParticles(display, 2, 0.3, 0.2, 0.3, 0.023);
if (this.random.nextInt(4) == 0) {
playFirebendingSound(display);

View file

@ -16,7 +16,6 @@ import com.projectkorra.projectkorra.ability.AirAbility;
import com.projectkorra.projectkorra.ability.FireAbility;
import com.projectkorra.projectkorra.attribute.Attribute;
import com.projectkorra.projectkorra.util.DamageHandler;
import com.projectkorra.projectkorra.util.ParticleEffect;
import com.projectkorra.projectkorra.util.TempBlock;
public class WallOfFire extends FireAbility {
@ -146,7 +145,6 @@ public class WallOfFire extends FireAbility {
continue;
}
playFirebendingParticles(block.getLocation(), 3, 0.6, 0.6, 0.6);
ParticleEffect.SMOKE_NORMAL.display(block.getLocation(), 2, 0.6, 0.6, 0.6);
if (this.random.nextInt(7) == 0) {
playFirebendingSound(block.getLocation());

View file

@ -90,9 +90,8 @@ public class JetBlast extends FireAbility implements ComboAbility {
final FireComboStream fs = new FireComboStream(this.player, this, this.player.getVelocity().clone().multiply(-1), this.player.getLocation(), 3, 0.5);
fs.setDensity(2);
fs.setDensity(3);
fs.setSpread(0.9F);
fs.setUseNewParticles(true);
fs.setCollides(false);
fs.runTaskTimer(ProjectKorra.plugin, 0, 1L);
this.tasks.add(fs);