-
Bug
-
Resolution: Won't Fix
-
Minor
-
None
-
None
I'm seeing problems with setting players as a passenger in a minecart.
I've spawned a minecart at the desired rail block's location, then set the player to be a passenger in that cart, with code like:
// OK, place a minecart on the clicked rail
Minecart cart = e.getClickedBlock().getLocation().getWorld().spawn(
e.getClickedBlock().getLocation(),
Minecart.class
);
// then put the player into it
cart.setPassenger(player);
It works, insofar as a minecart is spawned, and the player does ride it - however, the player is positioned off to one side of the cart - see screenshots to illustrate.
Do I need to do something special to make sure the player is positioned right?
This sounds very much like an old Bukkit bug: https://bukkit.atlassian.net/browse/BUKKIT-5351 - but that's from two years ago, with no further updates.