From 1754aa536a74f113aed20cacb841de563cdc9252 Mon Sep 17 00:00:00 2001 From: Kam Date: Thu, 6 Nov 2025 01:43:00 -0500 Subject: [PATCH] Fix mount rider jump handling --- .../java/noppes/npcs/client/gui/mainmenu/GuiNpcAI.java | 1 + .../java/noppes/npcs/entity/EntityNPCInterface.java | 10 ++++++---- src/main/resources/META-INF/customnpcs_at.cfg | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/noppes/npcs/client/gui/mainmenu/GuiNpcAI.java b/src/main/java/noppes/npcs/client/gui/mainmenu/GuiNpcAI.java index cc785f299..6e0ebfa6e 100644 --- a/src/main/java/noppes/npcs/client/gui/mainmenu/GuiNpcAI.java +++ b/src/main/java/noppes/npcs/client/gui/mainmenu/GuiNpcAI.java @@ -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; diff --git a/src/main/java/noppes/npcs/entity/EntityNPCInterface.java b/src/main/java/noppes/npcs/entity/EntityNPCInterface.java index 5602ba027..5b5bb06c2 100644 --- a/src/main/java/noppes/npcs/entity/EntityNPCInterface.java +++ b/src/main/java/noppes/npcs/entity/EntityNPCInterface.java @@ -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(); diff --git a/src/main/resources/META-INF/customnpcs_at.cfg b/src/main/resources/META-INF/customnpcs_at.cfg index 990efc151..5597bbba8 100644 --- a/src/main/resources/META-INF/customnpcs_at.cfg +++ b/src/main/resources/META-INF/customnpcs_at.cfg @@ -17,6 +17,7 @@ public net.minecraft.client.renderer.ItemRenderer field_78453_b # itemToRender public net.minecraft.client.renderer.entity.RenderPlayer func_77043_a(Lnet/minecraft/entity/EntityLivingBase;FFF)V # rotateCorpse #EntityLivingBase public net.minecraft.entity.EntityLivingBase func_82166_i()I # getArmSwingAnimationEnd +public net.minecraft.entity.EntityLivingBase field_70703_bu # isJumping # Minecraft public net.minecraft.client.Minecraft field_147126_aw # mcMusicTicker # MusicTicker