mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 08:27:45 +00:00
Fix mount rider jump handling
This commit is contained in:
1 parent
d00c1cf156
commit
1754aa536a
3 files changed
+8
-4
No files matched your search
@@ -15,6 +15,7 @@ import noppes.npcs.client.gui.util.IGuiData;
|
||||
import noppes.npcs.client.gui.util.ITextfieldListener;
|
||||
import noppes.npcs.constants.EnumCombatPolicy;
|
||||
import noppes.npcs.constants.EnumNavType;
|
||||
import noppes.npcs.constants.EnumRoleType;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.roles.RoleMount;
|
||||
|
||||
|
||||
@@ -2135,7 +2135,7 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
||||
protected void applyMountedVerticalMotion(EntityLivingBase rider, float moveSpeed) {
|
||||
if (canFly()) {
|
||||
double vertical = Math.max(0.1D, moveSpeed * 0.6D);
|
||||
if (rider.isJumping()) {
|
||||
if (rider.isJumping) {
|
||||
this.motionY = Math.min(this.motionY + vertical, vertical);
|
||||
this.isAirBorne = true;
|
||||
} else {
|
||||
@@ -2148,7 +2148,7 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
||||
this.motionY *= 0.6D;
|
||||
}
|
||||
}
|
||||
} else if (rider.isJumping() && this.onGround) {
|
||||
} else if (rider.isJumping && this.onGround) {
|
||||
this.motionY = 0.5D;
|
||||
this.isAirBorne = true;
|
||||
}
|
||||
@@ -2181,8 +2181,10 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
||||
EntityLivingBase rider = (EntityLivingBase) riddenByEntity;
|
||||
rider.prevRotationPitch = rider.rotationPitch;
|
||||
rider.prevRotationYaw = rider.rotationYaw;
|
||||
rider.setRenderYawOffset(this.renderYawOffset);
|
||||
rider.setRotationYawHead(this.renderYawOffset);
|
||||
rider.prevRenderYawOffset = this.renderYawOffset;
|
||||
rider.renderYawOffset = this.renderYawOffset;
|
||||
rider.prevRotationYawHead = this.renderYawOffset;
|
||||
rider.rotationYawHead = this.renderYawOffset;
|
||||
}
|
||||
} else {
|
||||
super.updateRiderPosition();
|
||||
|
||||
Reference in new issue
Block a user