mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-23 00:15:05 +00:00
commit
f6bc8bc87d
4 changed files with 18 additions and 2 deletions
|
@ -389,7 +389,8 @@ public class PKListener implements Listener {
|
||||||
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
||||||
public void onEntityDamageByBlock(EntityDamageByBlockEvent event) {
|
public void onEntityDamageByBlock(EntityDamageByBlockEvent event) {
|
||||||
Block block = event.getDamager();
|
Block block = event.getDamager();
|
||||||
|
if (block == null) return;
|
||||||
|
|
||||||
if (TempBlock.isTempBlock(block)) {
|
if (TempBlock.isTempBlock(block)) {
|
||||||
if (EarthAbility.isEarthbendable(block.getType()) && GeneralMethods.isSolid(block)) {
|
if (EarthAbility.isEarthbendable(block.getType()) && GeneralMethods.isSolid(block)) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.projectkorra.projectkorra.firebending;
|
||||||
import com.projectkorra.projectkorra.GeneralMethods;
|
import com.projectkorra.projectkorra.GeneralMethods;
|
||||||
import com.projectkorra.projectkorra.ProjectKorra;
|
import com.projectkorra.projectkorra.ProjectKorra;
|
||||||
import com.projectkorra.projectkorra.ability.AirAbility;
|
import com.projectkorra.projectkorra.ability.AirAbility;
|
||||||
|
import com.projectkorra.projectkorra.ability.CoreAbility;
|
||||||
import com.projectkorra.projectkorra.ability.FireAbility;
|
import com.projectkorra.projectkorra.ability.FireAbility;
|
||||||
import com.projectkorra.projectkorra.ability.WaterAbility;
|
import com.projectkorra.projectkorra.ability.WaterAbility;
|
||||||
import com.projectkorra.projectkorra.avatar.AvatarState;
|
import com.projectkorra.projectkorra.avatar.AvatarState;
|
||||||
|
@ -164,6 +165,14 @@ public class FireBlast extends FireAbility {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isFireBurst && !bPlayer.canBend(CoreAbility.getAbility("FireBurst"))) {
|
||||||
|
remove();
|
||||||
|
return;
|
||||||
|
} else if (!isFireBurst && !bPlayer.canBend(CoreAbility.getAbility("FireBlast"))) {
|
||||||
|
remove();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
speedFactor = speed * (ProjectKorra.time_step / 1000.0);
|
speedFactor = speed * (ProjectKorra.time_step / 1000.0);
|
||||||
ticks++;
|
ticks++;
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.projectkorra.projectkorra.firebending;
|
||||||
|
|
||||||
import com.projectkorra.projectkorra.GeneralMethods;
|
import com.projectkorra.projectkorra.GeneralMethods;
|
||||||
import com.projectkorra.projectkorra.ability.AirAbility;
|
import com.projectkorra.projectkorra.ability.AirAbility;
|
||||||
|
import com.projectkorra.projectkorra.ability.CoreAbility;
|
||||||
import com.projectkorra.projectkorra.ability.FireAbility;
|
import com.projectkorra.projectkorra.ability.FireAbility;
|
||||||
import com.projectkorra.projectkorra.avatar.AvatarState;
|
import com.projectkorra.projectkorra.avatar.AvatarState;
|
||||||
import com.projectkorra.projectkorra.util.DamageHandler;
|
import com.projectkorra.projectkorra.util.DamageHandler;
|
||||||
|
@ -233,7 +234,11 @@ public class FireBlastCharged extends FireAbility {
|
||||||
if (!bPlayer.canBendIgnoreBindsCooldowns(this) && !launched) {
|
if (!bPlayer.canBendIgnoreBindsCooldowns(this) && !launched) {
|
||||||
remove();
|
remove();
|
||||||
return;
|
return;
|
||||||
} else if (!player.isSneaking() && !charged) {
|
} else if (!bPlayer.canBend(CoreAbility.getAbility("FireBlast")) && !launched) {
|
||||||
|
remove();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if (!player.isSneaking() && !charged) {
|
||||||
remove();
|
remove();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -151,6 +151,7 @@ public class WaterArmsSpear extends WaterAbility {
|
||||||
progressSpear();
|
progressSpear();
|
||||||
} else {
|
} else {
|
||||||
createIceBall();
|
createIceBall();
|
||||||
|
remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (layer >= spearSphere) {
|
if (layer >= spearSphere) {
|
||||||
|
|
Loading…
Reference in a new issue