Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Kam committed 2026-02-21 04:15:30 -05:00
commit 0a6d9e1ef9
4 files changed
+32 -30

No files matched your search

@@ -238,7 +238,7 @@ public class AttributeItemUtil {
NBTTagCompound attrTag = rpgCore.hasKey(TAG_ATTRIBUTES) ? rpgCore.getCompoundTag(TAG_ATTRIBUTES) : new NBTTagCompound();
if (Keyboard.isKeyDown(ClientProxy.NPCButton.getKeyCode()) || override) {
List<String> newTooltips = new ArrayList<>();
if (!tooltip.isEmpty()) {
if (!tooltip.isEmpty() && !override) {
newTooltips.add(tooltip.get(0));
}
@@ -326,7 +326,11 @@ public class AttributeItemUtil {
newTooltips.addAll(buildSection(reqEntries));
}
tooltip = newTooltips;
if(override){
tooltip.addAll(newTooltips);
} else {
tooltip = newTooltips;
}
} else {
String keyName = Keyboard.getKeyName(ClientProxy.NPCButton.getKeyCode());
tooltip.add(EnumChatFormatting.YELLOW + "" + EnumChatFormatting.ITALIC +
@@ -209,21 +209,31 @@ public class AnimationMixinFunctions {
return null;
}
public static void playerFullModel_head(Entity p_78088_1_, CallbackInfo callbackInfo) {
if (!DBCAddon.IsAvailable() && ClientCacheHandler.playerAnimations.containsKey(p_78088_1_.getUniqueID())) {
AnimationData animData = ClientCacheHandler.playerAnimations.get(p_78088_1_.getUniqueID());
if (animData != null && animData.isActive()) {
Frame frame = (Frame) animData.animation.currentFrame();
if (frame.frameParts.containsKey(EnumAnimationPart.FULL_MODEL)) {
FramePart part = frame.frameParts.get(EnumAnimationPart.FULL_MODEL);
part.interpolateOffset();
part.interpolateAngles();
float pi = 180 / (float) Math.PI;
GL11.glTranslatef(part.prevPivots[0], -part.prevPivots[1], part.prevPivots[2]);
GL11.glRotatef(part.prevRotations[0] * pi, 1, 0, 0);
GL11.glRotatef(part.prevRotations[1] * pi, 0, 1, 0);
GL11.glRotatef(part.prevRotations[2] * pi, 0, 0, 1);
}
public static void playerFullModel_head(Entity entity, CallbackInfo callbackInfo) {
if (!ClientCacheHandler.playerAnimations.containsKey(entity.getUniqueID())) return;
AnimationData animData = ClientCacheHandler.playerAnimations.get(entity.getUniqueID());
if (animData == null || !animData.isActive()) return;
// Snap body rotation to head so animations face the look direction
if (entity instanceof EntityLivingBase) {
EntityLivingBase living = (EntityLivingBase) entity;
living.renderYawOffset = living.rotationYaw;
living.prevRenderYawOffset = living.prevRotationYaw;
}
// FULL_MODEL GL transforms (non-DBC only)
if (!DBCAddon.IsAvailable()) {
Frame frame = (Frame) animData.animation.currentFrame();
if (frame.frameParts.containsKey(EnumAnimationPart.FULL_MODEL)) {
FramePart part = frame.frameParts.get(EnumAnimationPart.FULL_MODEL);
part.interpolateOffset();
part.interpolateAngles();
float pi = 180 / (float) Math.PI;
GL11.glTranslatef(part.prevPivots[0], -part.prevPivots[1], part.prevPivots[2]);
GL11.glRotatef(part.prevRotations[0] * pi, 1, 0, 0);
GL11.glRotatef(part.prevRotations[1] * pi, 0, 1, 0);
GL11.glRotatef(part.prevRotations[2] * pi, 0, 0, 1);
}
}
}
@@ -173,7 +173,7 @@ public class GuiNPCManageEffects extends GuiNPCInterface2 implements ICustomScro
int iconWidth = effect.getWidth();
int iconHeight = effect.getHeight();
int width = data.getTotalWidth();
int height = data.getTotalWidth();
int height = data.getTotalHeight();
func_152125_a(x, y, iconX, iconY, iconWidth, iconHeight, iconRenderSize, iconRenderSize, width, height);
@@ -298,7 +298,6 @@ public class PlayerAbilityData extends AbstractDataAbilities implements IPlayerA
// Apply rotation and position locks after ability tick
applyRotationControl(player);
applyPositionLock(player);
applyAnimationRotationSync(player);
// Sync lock state to client (only sends when flags change)
syncAbilityStateIfNeeded(player);
@@ -846,17 +845,6 @@ public class PlayerAbilityData extends AbstractDataAbilities implements IPlayerA
}
}
private void applyAnimationRotationSync(EntityPlayer player) {
if (rotationLocked || currentAbility == null) return;
if (currentAbility.getPhase() == AbilityPhase.IDLE || currentAbility.getPhase() == AbilityPhase.DAZED)
return;
// TODO This is a temporary duct-tape solution to fix the animation not rotating with head rotation
if (!currentAbility.isRotationLockedForCurrentPhase() && player instanceof EntityPlayerMP) {
NoppesUtilPlayer.swingPlayerArm((EntityPlayerMP) player);
}
}
// ═══════════════════════════════════════════════════════════════════
// POSITION LOCKING (Player-specific application)
// ═══════════════════════════════════════════════════════════════════