forked from virt-mirrors/Sit
prioritize dismounting in the direction that the player is looking in
This commit is contained in:
parent
60efeb2298
commit
f9c6da104b
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue