Fix for boat type being changed in Minecraft 1.9+ when knocked back from the border; note this breaks boat knockback for Minecraft versions older than 1.9

This commit is contained in:
Brettflan 2016-11-29 03:13:06 -06:00
parent c0d1772418
commit ed0c46a557
1 changed files with 3 additions and 10 deletions

View File

@ -83,16 +83,9 @@ public class BorderCheckTask implements Runnable
rideLoc.setY(newLoc.getY() + vertOffset);
if (Config.Debug())
Config.logWarn("Player was riding a \"" + ride.toString() + "\".");
if (ride instanceof Boat)
{ // boats currently glitch on client when teleported, so crappy workaround is to remove it and spawn a new one
ride.remove();
ride = world.spawnEntity(rideLoc, EntityType.BOAT);
}
else
{
ride.setVelocity(new Vector(0, 0, 0));
ride.teleport(rideLoc, TeleportCause.PLUGIN);
}
ride.setVelocity(new Vector(0, 0, 0));
ride.teleport(rideLoc, TeleportCause.PLUGIN);
if (Config.RemountTicks() > 0)
{