diff --git a/README.md b/README.md index 5a6fb62..1e0b6a6 100644 --- a/README.md +++ b/README.md @@ -401,7 +401,6 @@ portalInfoServer=Server: %server% - Adds a config option to set the exit velocity of any players exiting a stargate - Adjusts vehicle teleportation a bit to prevent passengers' exit rotation from being wrong -- Reduces the outwards offset of teleported entities #### \[Version 0.9.3.1] EpicKnarvik97 fork diff --git a/src/main/java/net/knarcraft/stargate/portal/teleporter/Teleporter.java b/src/main/java/net/knarcraft/stargate/portal/teleporter/Teleporter.java index 77e7845..4773902 100644 --- a/src/main/java/net/knarcraft/stargate/portal/teleporter/Teleporter.java +++ b/src/main/java/net/knarcraft/stargate/portal/teleporter/Teleporter.java @@ -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()); }