Un-does the outwards offset reduction for teleported entities
This commit is contained in:
@ -13,6 +13,7 @@ import org.bukkit.Material;
|
||||
import org.bukkit.block.data.Bisected;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.block.data.type.Slab;
|
||||
import org.bukkit.entity.AbstractHorse;
|
||||
import org.bukkit.entity.Creature;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -140,9 +141,14 @@ public abstract class Teleporter {
|
||||
if (entitySize > 1) {
|
||||
double entityOffset;
|
||||
if (portal.getOptions().isAlwaysOn()) {
|
||||
entityOffset = (entityBoxSize / 2D) - 1;
|
||||
entityOffset = (entityBoxSize / 2D);
|
||||
} else {
|
||||
entityOffset = (entitySize / 2D) - 2;
|
||||
entityOffset = (entitySize / 2D) - 1;
|
||||
}
|
||||
//If a horse has a player riding it, the player will spawn inside the roof of a standard portal unless it's
|
||||
// moved one block out.
|
||||
if (entity instanceof AbstractHorse) {
|
||||
entityOffset += 1;
|
||||
}
|
||||
exitLocation = DirectionHelper.moveLocation(exitLocation, 0, 0, entityOffset, portal.getYaw());
|
||||
}
|
||||
|
Reference in New Issue
Block a user