Add ray tracing and bounding box API

By: blablubbabc <lukas@wirsindwir.de>
This commit is contained in:
Bukkit/Spigot
2018-10-26 19:59:36 +11:00
parent 0283ef18f5
commit 55523cfcfc
12 changed files with 1770 additions and 14 deletions

View File

@@ -9,6 +9,7 @@ import org.bukkit.block.BlockFace;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.material.Directional;
import org.bukkit.metadata.Metadatable;
import org.bukkit.util.BoundingBox;
import org.bukkit.util.Vector;
import java.util.List;
@@ -69,6 +70,16 @@ public interface Entity extends Metadatable, CommandSender, Nameable {
*/
public double getWidth();
/**
* Gets the entity's current bounding box.
* <p>
* The returned bounding box reflects the entity's current location and
* size.
*
* @return the entity's current bounding box
*/
public BoundingBox getBoundingBox();
/**
* Returns true if the entity is supported by a block. This value is a
* state updated by the server and is not recalculated unless the entity