fix firejet when you have illumination torch

This commit is contained in:
PhanaticD 2019-01-04 08:50:46 -05:00
parent fa4139eccc
commit 15ac7b6d5b

View file

@ -13,6 +13,8 @@ import org.bukkit.util.Vector;
import java.util.Random;
import static com.projectkorra.projectkorra.firebending.Illumination.isIlluminationTorch;
public class FireJet extends FireAbility {
@Attribute("AvatarStateToggle")
@ -51,7 +53,17 @@ public class FireJet extends FireAbility {
this.speed = this.getDayFactor(this.speed);
final Block block = player.getLocation().getBlock();
if (BlazeArc.isIgnitable(player, block) || ElementalAbility.isAir(block.getType()) || block.getType() == Material.STONE_SLAB || block.getType() == Material.ACACIA_SLAB || block.getType() == Material.BIRCH_SLAB || block.getType() == Material.DARK_OAK_SLAB || block.getType() == Material.JUNGLE_SLAB || block.getType() == Material.OAK_SLAB || block.getType() == Material.SPRUCE_SLAB || this.bPlayer.isAvatarState()) {
if (BlazeArc.isIgnitable(player, block) ||
ElementalAbility.isAir(block.getType()) ||
block.getType() == Material.STONE_SLAB ||
block.getType() == Material.ACACIA_SLAB ||
block.getType() == Material.BIRCH_SLAB ||
block.getType() == Material.DARK_OAK_SLAB ||
block.getType() == Material.JUNGLE_SLAB ||
block.getType() == Material.OAK_SLAB ||
block.getType() == Material.SPRUCE_SLAB ||
isIlluminationTorch(block) ||
this.bPlayer.isAvatarState()) {
player.setVelocity(player.getEyeLocation().getDirection().clone().normalize().multiply(this.speed));
if (!canFireGrief()) {
if (ElementalAbility.isAir(block.getType())) {