mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-23 00:15:05 +00:00
Fixed Airspout being able to be used after switching elements, also fixed being able to select multiple sources when using octopusform. (#506)
This commit is contained in:
parent
dd6bc984ba
commit
2907952ca2
2 changed files with 12 additions and 5 deletions
|
@ -1,15 +1,15 @@
|
|||
package com.projectkorra.projectkorra.airbending;
|
||||
|
||||
import com.projectkorra.projectkorra.GeneralMethods;
|
||||
import com.projectkorra.projectkorra.ability.AirAbility;
|
||||
import com.projectkorra.projectkorra.util.Flight;
|
||||
import java.util.Random;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.Random;
|
||||
import com.projectkorra.projectkorra.GeneralMethods;
|
||||
import com.projectkorra.projectkorra.ability.AirAbility;
|
||||
import com.projectkorra.projectkorra.util.Flight;
|
||||
|
||||
public class AirSpout extends AirAbility {
|
||||
|
||||
|
@ -88,6 +88,11 @@ public class AirSpout extends AirAbility {
|
|||
return;
|
||||
}
|
||||
|
||||
if(!bPlayer.canBind(this)) {
|
||||
remove();
|
||||
return;
|
||||
}
|
||||
|
||||
Block eyeBlock = player.getEyeLocation().getBlock();
|
||||
if (eyeBlock.isLiquid() || GeneralMethods.isSolid(eyeBlock)) {
|
||||
remove();
|
||||
|
|
|
@ -88,7 +88,9 @@ public class OctopusForm extends WaterAbility {
|
|||
this.blocks = new ArrayList<TempBlock>();
|
||||
this.newBlocks = new ArrayList<TempBlock>();
|
||||
this.time = System.currentTimeMillis();
|
||||
if(!player.isSneaking()) {
|
||||
this.sourceBlock = BlockSource.getWaterSourceBlock(player, range, ClickType.LEFT_CLICK, true, true, bPlayer.canPlantbend());
|
||||
}
|
||||
|
||||
if (sourceBlock != null) {
|
||||
sourceLocation = sourceBlock.getLocation();
|
||||
|
|
Loading…
Reference in a new issue