Posted November 20, 20213 yr Hey My Dear Friends, Could you teach me how to GET THE REAL SPEED of entity or player(Such as the horse's speed when it running)? I'm modding my first mod,so I don't know how to do that,I have searched for the Google and Youtube but there was no answer for the Minecraft1.17,so I couldn't really understand it. If you can help me,I'm really thank a lot!!!
November 20, 20213 yr you can get the Entity speed by LivingEntity#getSpeed, you also can look at LivingEntity#getFrictionInfluencedSpeed Edited November 20, 20213 yr by Luis_ST
November 20, 20213 yr Author 13 minutes ago, Luis_ST said: you can get the Entity speed by LivingEntity#getSpeed, you also can look at LivingEntity#getFrictionInfluencedSpeed Oh thank you bro.But I need the REAL-TIME speed ,not the entity's attribute.
November 20, 20213 yr then you need to calculate it manually from the current and the last Entity Position
November 20, 20213 yr Author 1 hour ago, Luis_ST said: then you need to calculate it manually from the current and the last Entity Position ohh I know what should i do ,thanks alots!!!!! Edited November 20, 20213 yr by xiaomi_lai 1
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.