Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-17 05:20:05 +01:00
Implemented LivingEntity.getEyeLocation()
Dieser Commit ist enthalten in:
Ursprung
454da93a00
Commit
b819ffe8a4
@ -6,6 +6,8 @@ import net.minecraft.server.EntityArrow;
|
|||||||
import net.minecraft.server.EntityEgg;
|
import net.minecraft.server.EntityEgg;
|
||||||
import net.minecraft.server.EntityLiving;
|
import net.minecraft.server.EntityLiving;
|
||||||
import net.minecraft.server.EntitySnowball;
|
import net.minecraft.server.EntitySnowball;
|
||||||
|
|
||||||
|
import org.bukkit.Location;
|
||||||
import org.bukkit.craftbukkit.CraftServer;
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
import org.bukkit.craftbukkit.CraftWorld;
|
import org.bukkit.craftbukkit.CraftWorld;
|
||||||
|
|
||||||
@ -171,4 +173,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
|||||||
public void damage(int amount, org.bukkit.entity.Entity source) {
|
public void damage(int amount, org.bukkit.entity.Entity source) {
|
||||||
entity.a(((CraftEntity)source).getHandle(), amount);
|
entity.a(((CraftEntity)source).getHandle(), amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Location getEyeLocation() {
|
||||||
|
Location loc = getLocation();
|
||||||
|
loc.setY(loc.getY() + getEyeHeight());
|
||||||
|
return loc;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren