Fixes some things regarding vehicle teleportation
Adds extra space between the portal and the vehicle if the destination portal is always on Fixes a bug causing vehicles not being detected soon enough Fixes boats facing into the portal rather than out from the portal Fixes boats spawning inside water rather than on top of it if water is in front of a portal
This commit is contained in:
@ -18,10 +18,20 @@ public final class EntityHelper {
|
||||
* contain the entity.</p>
|
||||
*
|
||||
* @param entity <p>The entity to get max size for</p>
|
||||
* @return <p></p>
|
||||
* @return <p>The max size of the entity</p>
|
||||
*/
|
||||
public static int getEntityMaxSizeInt(Entity entity) {
|
||||
return (int) Math.ceil((float) getEntityMaxSize(entity));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the max size of an entity along its x and z axis
|
||||
*
|
||||
* @param entity <p>The entity to get max size for</p>
|
||||
* @return <p>The max size of the entity</p>
|
||||
*/
|
||||
public static double getEntityMaxSize(Entity entity) {
|
||||
return Math.ceil((float) Math.max(entity.getBoundingBox().getWidthX(), entity.getBoundingBox().getWidthZ()));
|
||||
return Math.max(entity.getBoundingBox().getWidthX(), entity.getBoundingBox().getWidthZ());
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user