1.12 BoundingBox compatibility issue

This commit is contained in:
Indyuce 2020-02-22 20:48:43 +01:00
parent 3d34595edc
commit 7fc5b56d59
2 changed files with 2 additions and 2 deletions

View File

@ -131,7 +131,7 @@ public class Fire_Rage extends Skill {
loc.getWorld().spawnParticle(Particle.LAVA, loc, 0);
for (Entity target : MMOCoreUtils.getNearbyChunkEntities(loc))
if (target.getBoundingBox().expand(.2, .2, .2).contains(loc.toVector()) && MMOCoreUtils.canTarget(data.getPlayer(), target)) {
if (MMOLib.plugin.getNMS().isInBoundingBox(target, loc) && MMOCoreUtils.canTarget(data.getPlayer(), target)) {
loc.getWorld().spawnParticle(Particle.LAVA, loc, 8);
loc.getWorld().spawnParticle(Particle.FLAME, loc, 32, 0, 0, 0, .1);
loc.getWorld().playSound(loc, Sound.ENTITY_BLAZE_HURT, 2, 1);

View File

@ -61,7 +61,7 @@ public class Fireball extends Skill {
// loc.getWorld().spawnParticle(Particle.LAVA, loc, 0);
for (Entity target : MMOCoreUtils.getNearbyChunkEntities(loc))
if (target.getBoundingBox().expand(.2, .2, .2).contains(loc.toVector()) && MMOCoreUtils.canTarget(data.getPlayer(), target)) {
if (MMOLib.plugin.getNMS().isInBoundingBox(target, loc) && MMOCoreUtils.canTarget(data.getPlayer(), target)) {
loc.getWorld().spawnParticle(Particle.LAVA, loc, 8);
loc.getWorld().spawnParticle(Particle.FLAME, loc, 32, 0, 0, 0, .1);
loc.getWorld().playSound(loc, Sound.ENTITY_BLAZE_HURT, 2, 1);