bergerkiller / BKCommonLib

An extensive library I use in all of my plugins
38 stars 38 forks source link

getMovement in CommonLivingEntity is wrong #19

Open ghost opened 10 years ago

ghost commented 10 years ago

You assume that a player is moving into the same direction that he looks which is a wrong assumption if the player using any other key than W or S.

return MathUtil.getDirection(loc.getYaw(), loc.getPitch()).multiply(getForwardMovement());

This only creates a vector that is pointing where the player currently looks not where he is actually walking.