Posted June 5, 20232 yr I would like to force the pose of a living entity to a standing position (i.e. Pose.STANDING) when it is riding a certain vehicle. I have tried to call Entity#setPose every tick via LivingTickEvent, but the living entity remains in a sitting position. Here is my code: // I made it a low-priority event because I was wondering if the code should be executed at the end of each tick. @SubscribeEvent(priority = EventPriority.LOWEST) public static void livingTickEvent(LivingEvent.LivingTickEvent event) { LivingEntity livingEntity = event.getEntity(); if (!livingEntity.level.isClientSide && livingEntity.getVehicle() instanceof TheVehicle) { livingEntity.setPose(Pose.STANDING); } } By the way, I am aware there is a setForcedPose method, but it's only for the Player class. Edited June 5, 20232 yr by LeeCrafts
June 5, 20232 yr 9 hours ago, LeeCrafts said: By the way, I am aware there is a setForcedPose method, but it's only for the Player class. The event you are using runs at the top of the tick method, so it will be superceeded by all other logic. There is unfortunately no good way to do this.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.