mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-13 11:15:57 -07:00
Second part of NPE and arctan update :3
This commit is contained in:
@@ -10,6 +10,7 @@ import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
import org.bukkit.craftbukkit.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
||||
import org.bukkit.craftbukkit.TrigMath;
|
||||
import org.bukkit.event.Event.Type;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
@@ -236,7 +237,7 @@ public abstract class EntityLiving extends Entity {
|
||||
if (f > 0.05F) {
|
||||
f3 = 1.0F;
|
||||
f2 = f * 3.0F;
|
||||
f1 = (float) Math.atan2(d1, d0) * 180.0F / 3.1415927F - 90.0F;
|
||||
f1 = (float) TrigMath.atan2(d1, d0) * 180.0F / 3.1415927F - 90.0F;
|
||||
}
|
||||
|
||||
if (this.aY > 0.0F) {
|
||||
|
Reference in New Issue
Block a user