Search in sources :

Example 1 with AABB

use of net.minecraft.world.phys.AABB in project Denizen-For-Bukkit by DenizenScript.

the class EntityHelperImpl method setBoundingBox.

@Override
public void setBoundingBox(Entity entity, BoundingBox boundingBox) {
    Vector low = boundingBox.getLow();
    Vector high = boundingBox.getHigh();
    ((CraftEntity) entity).getHandle().setBoundingBox(new AABB(low.getX(), low.getY(), low.getZ(), high.getX(), high.getY(), high.getZ()));
}
Also used : Vector(org.bukkit.util.Vector) AABB(net.minecraft.world.phys.AABB)

Example 2 with AABB

use of net.minecraft.world.phys.AABB in project Denizen-For-Bukkit by DenizenScript.

the class EntityHelperImpl method getBoundingBox.

@Override
public BoundingBox getBoundingBox(Entity entity) {
    AABB boundingBox = ((CraftEntity) entity).getHandle().getBoundingBox();
    Vector position = new Vector(boundingBox.minX, boundingBox.minY, boundingBox.minZ);
    Vector size = new Vector(boundingBox.maxX, boundingBox.maxY, boundingBox.maxZ);
    return new BoundingBox(position, size);
}
Also used : BoundingBox(com.denizenscript.denizen.nms.util.BoundingBox) Vector(org.bukkit.util.Vector) AABB(net.minecraft.world.phys.AABB)

Example 3 with AABB

use of net.minecraft.world.phys.AABB in project Denizen-For-Bukkit by DenizenScript.

the class EntityHelperImpl method getBoundingBox.

@Override
public BoundingBox getBoundingBox(Entity entity) {
    AABB boundingBox = ((CraftEntity) entity).getHandle().getBoundingBox();
    Vector position = new Vector(boundingBox.minX, boundingBox.minY, boundingBox.minZ);
    Vector size = new Vector(boundingBox.maxX, boundingBox.maxY, boundingBox.maxZ);
    return new BoundingBox(position, size);
}
Also used : BoundingBox(com.denizenscript.denizen.nms.util.BoundingBox) Vector(org.bukkit.util.Vector) AABB(net.minecraft.world.phys.AABB)

Example 4 with AABB

use of net.minecraft.world.phys.AABB in project Denizen-For-Bukkit by DenizenScript.

the class EntityHelperImpl method setBoundingBox.

@Override
public void setBoundingBox(Entity entity, BoundingBox boundingBox) {
    Vector low = boundingBox.getLow();
    Vector high = boundingBox.getHigh();
    ((CraftEntity) entity).getHandle().setBoundingBox(new AABB(low.getX(), low.getY(), low.getZ(), high.getX(), high.getY(), high.getZ()));
}
Also used : Vector(org.bukkit.util.Vector) AABB(net.minecraft.world.phys.AABB)

Aggregations

AABB (net.minecraft.world.phys.AABB)4 Vector (org.bukkit.util.Vector)4 BoundingBox (com.denizenscript.denizen.nms.util.BoundingBox)2