prioritize dismounting in the direction that the player is looking in

This commit is contained in:
Oth3r 2024-09-28 17:33:53 -05:00
commit f9c6da104b

View file

@ -20,7 +20,8 @@ public class TextDisplayDismountMixin extends DisplayEntity {
@Override @Override
public Vec3d updatePassengerForDismount(LivingEntity passenger) { public Vec3d updatePassengerForDismount(LivingEntity passenger) {
int[][] offset = Dismounting.getDismountOffsets(Direction.NORTH); // get the passenger's horizontal rotation, rotated counterclockwise, because the method rotates it clockwise for some reason
int[][] offset = Dismounting.getDismountOffsets(passenger.getHorizontalFacing().rotateYCounterclockwise());
// new array with another slot // new array with another slot
int[][] dismountOffsets = new int[offset.length + 1][]; int[][] dismountOffsets = new int[offset.length + 1][];
// add an empty offset to the start of the array // add an empty offset to the start of the array