Un-does the outwards offset reduction for teleported entities
This commit is contained in:
parent
f6438eb872
commit
f70ba24e95
@ -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
|
||||
|
||||
|
@ -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());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user