cannon correctly loadded title + fixed rotation being all wrong
This commit is contained in:
parent
7c85fe62ca
commit
63f9622876
@ -46,6 +46,8 @@ import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.common.util.UtilTextMiddle;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.itemstack.ItemBuilder;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
@ -206,10 +208,17 @@ public class Cannon implements Listener
|
||||
return;
|
||||
}
|
||||
|
||||
ClansManager.getInstance().runSyncLater(() -> {
|
||||
if (event.getPlayer().getInventory().equals(_inventory))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (canBeFired())
|
||||
{
|
||||
|
||||
UtilTextMiddle.display("Cannon Ready", "Power Level: " + C.cGreen + UtilText.repeat("▌", getPower()) + C.cRed + UtilText.repeat("▌", 3 - getPower()), 20, 100, 20, _rider);
|
||||
}
|
||||
}, 3L);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
@ -512,8 +521,8 @@ public class Cannon implements Listener
|
||||
}
|
||||
|
||||
ArmorStand armorStand = (ArmorStand) UtilMath.getFirst(_entities);
|
||||
double standYaw = Math.abs(Math.toDegrees(armorStand.getHeadPose().getY()) % 360);
|
||||
double riderYaw = Math.abs(_rider.getLocation().getYaw() % 360);
|
||||
double standYaw = Math.toDegrees(armorStand.getHeadPose().getY()) % 360;
|
||||
double riderYaw = _rider.getLocation().getYaw() % 360;
|
||||
|
||||
double dif = riderYaw - standYaw;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user