mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-09-17 07:37:17 +00:00
Fix Suffocate & Bloodbending "grab" range
Fix preset Fix Suffocate & Bloodbending bending self Fix Bloodbending & Suffocate "grab" range
This commit is contained in:
parent
8049e87e52
commit
066136fbe8
|
@ -130,8 +130,16 @@ public class Suffocate implements ConfigLoadable {
|
|||
targets.add((LivingEntity) ent);
|
||||
} else {
|
||||
//Entity ent = GeneralMethods.getTargetedEntity(player, range, new ArrayList<Entity>());
|
||||
Location location = GeneralMethods.getTargetedLocation(player, 6, transparent);
|
||||
List<Entity> entities = GeneralMethods.getEntitiesAroundPoint(location, 1.5);
|
||||
List<Entity> entities = new ArrayList<Entity>();
|
||||
for (int i = 0; i < 6; i++) {
|
||||
Location location = GeneralMethods.getTargetedLocation(player, i, transparent);
|
||||
entities = GeneralMethods.getEntitiesAroundPoint(location, 1.7);
|
||||
if (entities.contains(player))
|
||||
entities.remove(player);
|
||||
if (entities != null && !entities.isEmpty() && !entities.contains(player)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (entities == null || entities.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -147,7 +147,7 @@ public class Preset {
|
|||
HashMap<Integer, String> abilities = (HashMap<Integer, String>) preset.abilities.clone();
|
||||
boolean boundAll = true;
|
||||
for (int i = 1; i <= 9; i++) {
|
||||
if (!GeneralMethods.canBend(player.getName(), abilities.get(i))) {
|
||||
if (!GeneralMethods.canBind(player.getName(), abilities.get(i))) {
|
||||
abilities.remove(i);
|
||||
boundAll = false;
|
||||
}
|
||||
|
|
|
@ -89,8 +89,16 @@ public class Bloodbending {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
Location location = GeneralMethods.getTargetedLocation(player, 6, transparent);
|
||||
List<Entity> entities = GeneralMethods.getEntitiesAroundPoint(location, 1.5);
|
||||
List<Entity> entities = new ArrayList<Entity>();
|
||||
for (int i = 0; i < 6; i++) {
|
||||
Location location = GeneralMethods.getTargetedLocation(player, i, transparent);
|
||||
entities = GeneralMethods.getEntitiesAroundPoint(location, 1.7);
|
||||
if (entities.contains(player))
|
||||
entities.remove(player);
|
||||
if (entities != null && !entities.isEmpty() && !entities.contains(player)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (entities == null || entities.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue