mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-09-11 04:39:32 +00:00
Forgot to apply files to commit
My b
This commit is contained in:
parent
41109c5251
commit
65dd2c3c80
|
@ -32,8 +32,10 @@ import org.bukkit.util.Vector;
|
||||||
import com.projectkorra.ProjectKorra.Ability.AbilityModule;
|
import com.projectkorra.ProjectKorra.Ability.AbilityModule;
|
||||||
import com.projectkorra.ProjectKorra.Ability.AbilityModuleManager;
|
import com.projectkorra.ProjectKorra.Ability.AbilityModuleManager;
|
||||||
import com.projectkorra.ProjectKorra.earthbending.EarthPassive;
|
import com.projectkorra.ProjectKorra.earthbending.EarthPassive;
|
||||||
|
import com.projectkorra.ProjectKorra.waterbending.FreezeMelt;
|
||||||
import com.projectkorra.ProjectKorra.waterbending.WaterCore;
|
import com.projectkorra.ProjectKorra.waterbending.WaterCore;
|
||||||
import com.projectkorra.abilities.RaiseEarth.EarthColumn;
|
import com.projectkorra.abilities.RaiseEarth.EarthColumn;
|
||||||
|
import com.projectkorra.abilities.Surge.Surge;
|
||||||
|
|
||||||
public class Methods {
|
public class Methods {
|
||||||
|
|
||||||
|
@ -341,8 +343,18 @@ public class Methods {
|
||||||
BlockFace[] faces = {BlockFace.EAST, BlockFace.WEST, BlockFace.NORTH, BlockFace.SOUTH };
|
BlockFace[] faces = {BlockFace.EAST, BlockFace.WEST, BlockFace.NORTH, BlockFace.SOUTH };
|
||||||
for (BlockFace face: faces) {
|
for (BlockFace face: faces) {
|
||||||
Block blocki = block.getRelative(face);
|
Block blocki = block.getRelative(face);
|
||||||
if (isWater(block) && blocki.getData() == full) sources++;
|
/*
|
||||||
if (blocki.getType() == Material.ICE || blocki.getType() == Material.PACKED_ICE) sources++;
|
* TODO : Checks for WaterManip and other abilities.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (isWater(block) && blocki.getData() == full) {
|
||||||
|
sources++;
|
||||||
|
}
|
||||||
|
if (FreezeMelt.frozenblocks.containsKey(blocki)) {
|
||||||
|
if (FreezeMelt.frozenblocks.get(blocki) == full) sources++;
|
||||||
|
} else if (blocki.getType() == Material.ICE){
|
||||||
|
sources++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (sources >= 2) return true;
|
if (sources >= 2) return true;
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
package com.projectkorra.ProjectKorra.waterbending;
|
package com.projectkorra.ProjectKorra.waterbending;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
|
@ -33,15 +36,15 @@ public class WaterPassive {
|
||||||
player.setVelocity(player.getEyeLocation().getDirection().clone().normalize().multiply(swimFactor));
|
player.setVelocity(player.getEyeLocation().getDirection().clone().normalize().multiply(swimFactor));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (player.getLocation().getBlock().isLiquid()) {
|
// if (player.getLocation().getBlock().isLiquid()) {
|
||||||
for (Block block: Methods.getBlocksAroundPoint(player.getLocation(), 2)) {
|
// for (Block block: Methods.getBlocksAroundPoint(player.getLocation(), 2)) {
|
||||||
if (Methods.isAdjacentToThreeOrMoreSources(block) && Methods.isWater(block)) {
|
// if (Methods.isAdjacentToThreeOrMoreSources(block) && Methods.isWater(block) && !tempHaltPassive.contains(player.getName())) {
|
||||||
byte full = 0x0;
|
// byte full = 0x0;
|
||||||
block.setType(Material.WATER);
|
// block.setType(Material.WATER);
|
||||||
block.setData(full);
|
// block.setData(full);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue