From b013f412b23efe59979d388b39becaae288add8e Mon Sep 17 00:00:00 2001 From: Kam Date: Mon, 9 Mar 2026 19:54:29 -0400 Subject: [PATCH 1/8] Six Overlays in Singleplayer --- .../java/kamkeel/npcs/controllers/SyncController.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/kamkeel/npcs/controllers/SyncController.java b/src/main/java/kamkeel/npcs/controllers/SyncController.java index 6403a2c1b..d0ee7b16c 100644 --- a/src/main/java/kamkeel/npcs/controllers/SyncController.java +++ b/src/main/java/kamkeel/npcs/controllers/SyncController.java @@ -184,6 +184,14 @@ public class SyncController { DBCAddon.instance.syncPlayer(player); syncPlayerData(player, false); PartyInfoPacket.sendPartyData(player); + + // Sync skin overlays after full handshake to ensure the client is ready. + // Overlays are not part of getSyncNBTFull(), and packets sent during + // PlayerLoggedInEvent can arrive before the client entity exists. + PlayerData data = PlayerData.get(player); + if (data != null) { + data.skinOverlays.updateClient(); + } } private static EnumMap getServerRevisionSnapshot() { From 676c0626d19900e94aeb9d2d5d569ca765f1d4c6 Mon Sep 17 00:00:00 2001 From: Kam Date: Mon, 9 Mar 2026 19:56:25 -0400 Subject: [PATCH 2/8] Fix Some Bounding Box Issues!!!!! --- src/main/java/noppes/npcs/entity/EntityCustomNpc.java | 3 ++- src/main/java/noppes/npcs/entity/EntityNPCGolem.java | 4 +++- src/main/java/noppes/npcs/entity/EntityNPCInterface.java | 3 ++- src/main/java/noppes/npcs/entity/EntityNpcDragon.java | 4 +++- src/main/java/noppes/npcs/entity/EntityNpcSlime.java | 4 +++- src/main/java/noppes/npcs/entity/old/EntityNPCEnderman.java | 4 +++- 6 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/main/java/noppes/npcs/entity/EntityCustomNpc.java b/src/main/java/noppes/npcs/entity/EntityCustomNpc.java index b1a3c44f3..e1ff3544d 100644 --- a/src/main/java/noppes/npcs/entity/EntityCustomNpc.java +++ b/src/main/java/noppes/npcs/entity/EntityCustomNpc.java @@ -86,7 +86,8 @@ public class EntityCustomNpc extends EntityNPCFlying { worldObj.MAX_ENTITY_RADIUS = newWidth / 2; } - setSize(newWidth, newHeight); + this.width = newWidth; + this.height = newHeight; this.setPosition(posX, posY, posZ); } } diff --git a/src/main/java/noppes/npcs/entity/EntityNPCGolem.java b/src/main/java/noppes/npcs/entity/EntityNPCGolem.java index bb6544071..5eb111e4d 100644 --- a/src/main/java/noppes/npcs/entity/EntityNPCGolem.java +++ b/src/main/java/noppes/npcs/entity/EntityNPCGolem.java @@ -37,7 +37,9 @@ public class EntityNPCGolem extends EntityNPCInterface { newWidth = 1.4f; newHeight = 2.5f; } - setSize(newWidth, newHeight); + this.width = newWidth; + this.height = newHeight; + this.setPosition(posX, posY, posZ); if (width / 2 > World.MAX_ENTITY_RADIUS) { World.MAX_ENTITY_RADIUS = width / 2; } diff --git a/src/main/java/noppes/npcs/entity/EntityNPCInterface.java b/src/main/java/noppes/npcs/entity/EntityNPCInterface.java index c21e13c8b..77927d4b1 100644 --- a/src/main/java/noppes/npcs/entity/EntityNPCInterface.java +++ b/src/main/java/noppes/npcs/entity/EntityNPCInterface.java @@ -1285,7 +1285,8 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti World.MAX_ENTITY_RADIUS = newWidth / 2; } - setSize(newWidth, newHeight); + this.width = newWidth; + this.height = newHeight; this.setPosition(posX, posY, posZ); } diff --git a/src/main/java/noppes/npcs/entity/EntityNpcDragon.java b/src/main/java/noppes/npcs/entity/EntityNpcDragon.java index a9df9da99..c5952fa3c 100644 --- a/src/main/java/noppes/npcs/entity/EntityNpcDragon.java +++ b/src/main/java/noppes/npcs/entity/EntityNpcDragon.java @@ -115,7 +115,9 @@ public class EntityNpcDragon extends EntityNPCInterface { // } @Override public void updateHitbox() { - setSize(1.8f, 1.4f); + this.width = 1.8f; + this.height = 1.4f; + this.setPosition(posX, posY, posZ); if (width / 2 > World.MAX_ENTITY_RADIUS) { World.MAX_ENTITY_RADIUS = width / 2; } diff --git a/src/main/java/noppes/npcs/entity/EntityNpcSlime.java b/src/main/java/noppes/npcs/entity/EntityNpcSlime.java index 9794de069..93bdc5a7d 100644 --- a/src/main/java/noppes/npcs/entity/EntityNpcSlime.java +++ b/src/main/java/noppes/npcs/entity/EntityNpcSlime.java @@ -17,7 +17,9 @@ public class EntityNpcSlime extends EntityNPCInterface { @Override public void updateHitbox() { - setSize(0.8f, 0.8f); + this.width = 0.8f; + this.height = 0.8f; + this.setPosition(posX, posY, posZ); if (width / 2 > World.MAX_ENTITY_RADIUS) { World.MAX_ENTITY_RADIUS = width / 2; } diff --git a/src/main/java/noppes/npcs/entity/old/EntityNPCEnderman.java b/src/main/java/noppes/npcs/entity/old/EntityNPCEnderman.java index 958237c17..6479f90c7 100644 --- a/src/main/java/noppes/npcs/entity/old/EntityNPCEnderman.java +++ b/src/main/java/noppes/npcs/entity/old/EntityNPCEnderman.java @@ -40,7 +40,9 @@ public class EntityNPCEnderman extends EntityNpcEnderchibi { newHeight = (newHeight / 5f) * display.modelSize; newWidth = Math.max(newWidth, 0.00001f); newHeight = Math.max(newHeight, 0.00001f); - setSize(newWidth, newHeight); + this.width = newWidth; + this.height = newHeight; + this.setPosition(posX, posY, posZ); if (width / 2 > World.MAX_ENTITY_RADIUS) { World.MAX_ENTITY_RADIUS = width / 2; } From b0168c1d55d7a6636929ee5490fd8b6f412e1ec2 Mon Sep 17 00:00:00 2001 From: Kam Date: Mon, 9 Mar 2026 22:15:22 -0400 Subject: [PATCH 3/8] Fix Some issues with Lang Setup, Button Widths, Moving System --- .../gui/global/GuiAbilityDirectory.java | 59 ++++++++++++++----- .../gui/global/GuiAnimationDirectory.java | 26 ++++---- .../client/gui/global/GuiEffectDirectory.java | 3 +- .../gui/global/GuiLinkedItemDirectory.java | 3 +- .../gui/util/GuiDirectoryCategorized.java | 23 ++++++-- .../npcs/client/gui/util/GuiNpcButton.java | 57 ++++++++++++++++-- .../assets/customnpcs/lang/en_US.lang | 11 ++++ 7 files changed, 141 insertions(+), 41 deletions(-) diff --git a/src/main/java/noppes/npcs/client/gui/global/GuiAbilityDirectory.java b/src/main/java/noppes/npcs/client/gui/global/GuiAbilityDirectory.java index 8c37c1e39..7599bb18e 100644 --- a/src/main/java/noppes/npcs/client/gui/global/GuiAbilityDirectory.java +++ b/src/main/java/noppes/npcs/client/gui/global/GuiAbilityDirectory.java @@ -269,7 +269,24 @@ public class GuiAbilityDirectory extends GuiDirectoryCategorized @Override protected void onCloneItem() { - // Abilities don't support cloning through this mechanism + if (currentIsBuiltIn) return; + if (isChainedMode() && selectedChain != null) { + ChainedAbility clone = new ChainedAbility(); + clone.readNBT(selectedChain.writeNBT(false)); + String cloneName = selectedChain.getName() + "_copy"; + clone.setName(cloneName); + PacketClient.sendClient(new ChainedAbilitySavePacket(clone.writeNBT(false))); + if (selectedCatId >= 0) requestItemsInCategory(selectedCatId); + } else if (selectedAbility != null) { + Ability clone = AbilityController.Instance.fromNBT(selectedAbility.writeNBT(false)); + if (clone != null) { + clone.setId(UUID.randomUUID().toString()); + String cloneName = selectedAbility.getName() + "_copy"; + clone.setName(cloneName); + PacketClient.sendClient(new CustomAbilitySavePacket(clone.writeNBT(false))); + if (selectedCatId >= 0 && isCustomMode()) requestItemsInCategory(selectedCatId); + } + } } @Override @@ -672,10 +689,10 @@ public class GuiAbilityDirectory extends GuiDirectoryCategorized if (!isPlaying || isPaused) { String statusKey = isPaused ? "animation.paused" : "animation.stopped"; - addLabel(new GuiNpcLabel(90, statusKey, btnX, playY + 5)); + addLabel(new GuiNpcLabel(90, statusKey, btnX, playY + 5, 0xFFFFFF)); addButton(new GuiTexturedButton(91, "", btnX + 65, playY, 11, 20, animTexture, 18, 71)); } else { - addLabel(new GuiNpcLabel(90, "animation.playing", btnX, playY + 5)); + addLabel(new GuiNpcLabel(90, "animation.playing", btnX, playY + 5, 0xFFFFFF)); addButton(new GuiTexturedButton(92, "", btnX + 65, playY, 14, 20, animTexture, 0, 71)); } if (isActive) { @@ -683,13 +700,19 @@ public class GuiAbilityDirectory extends GuiDirectoryCategorized } } - // Edit + Remove at bottom - int editY = contentY + contentH - btnH * 2 - gap; - GuiNpcButton editBtn = new GuiNpcButton(51, rightX, editY, rightPanelW, btnH, "gui.edit"); + // Edit + Copy on one row, Remove below + int btnY = contentY + contentH - btnH * 2 - gap; + int halfW = (rightPanelW - gap) / 2; + + GuiNpcButton editBtn = new GuiNpcButton(51, rightX, btnY, halfW, btnH, "gui.edit"); editBtn.enabled = hasSelectedItem() && movePhase == 0 && !currentIsBuiltIn; addButton(editBtn); - int removeY = editY + btnH + gap; + GuiNpcButton cloneBtn = new GuiNpcButton(52, rightX + halfW + gap, btnY, halfW, btnH, "gui.copy"); + cloneBtn.enabled = hasSelectedItem() && movePhase == 0 && !currentIsBuiltIn; + addButton(cloneBtn); + + int removeY = btnY + btnH + gap; GuiNpcButton removeBtn = new GuiNpcButton(53, rightX, removeY, rightPanelW, btnH, "gui.remove"); removeBtn.enabled = hasSelectedItem() && movePhase == 0 && !currentIsBuiltIn; removeBtn.setTextColor(0xFF5555); @@ -783,6 +806,8 @@ public class GuiAbilityDirectory extends GuiDirectoryCategorized OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit); GL11.glDisable(GL11.GL_TEXTURE_2D); OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); + GL11.glDisable(GL11.GL_COLOR_MATERIAL); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glDisable(GL11.GL_SCISSOR_TEST); GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT); @@ -836,6 +861,8 @@ public class GuiAbilityDirectory extends GuiDirectoryCategorized OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit); GL11.glDisable(GL11.GL_TEXTURE_2D); OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); + GL11.glDisable(GL11.GL_COLOR_MATERIAL); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT); GL11.glPopMatrix(); } @@ -959,32 +986,32 @@ public class GuiAbilityDirectory extends GuiDirectoryCategorized if (isChainedMode() && selectedChain != null) { fontRendererObj.drawString(selectedChain.getDisplayName(), x, y, 0xFFFFFF, true); y += 14; - fontRendererObj.drawString("Entries: " + selectedChain.getEntries().size(), x, y, 0xB5B5B5, false); + fontRendererObj.drawString(StatCollector.translateToLocal("ability.entries") + ": " + selectedChain.getEntries().size(), x, y, 0xB5B5B5, false); y += 12; - fontRendererObj.drawString("Cooldown: " + selectedChain.getCooldownTicks() + "t", x, y, 0xB5B5B5, false); + fontRendererObj.drawString(StatCollector.translateToLocal("ability.cooldown") + ": " + selectedChain.getCooldownTicks() + "t", x, y, 0xB5B5B5, false); y += 12; UserType ut = selectedChain.getAllowedBy(); - fontRendererObj.drawString("Allowed: " + ut.name(), x, y, 0xB5B5B5, false); + fontRendererObj.drawString(StatCollector.translateToLocal("ability.allowed") + ": " + ut.name(), x, y, 0xB5B5B5, false); } else if (selectedAbility != null) { fontRendererObj.drawString(selectedAbility.getDisplayName(), x, y, 0xFFFFFF, true); y += 14; String typeId = selectedAbility.getTypeId(); String typeName = StatCollector.translateToLocal(typeId); - fontRendererObj.drawString("Type: " + typeName, x, y, 0xFFAE0D, false); + fontRendererObj.drawString(StatCollector.translateToLocal("gui.type") + ": " + typeName, x, y, 0xFFAE0D, false); y += 12; - fontRendererObj.drawString("Cooldown: " + selectedAbility.getCooldownTicks() + "t", x, y, 0xB5B5B5, false); + fontRendererObj.drawString(StatCollector.translateToLocal("ability.cooldown") + ": " + selectedAbility.getCooldownTicks() + "t", x, y, 0xB5B5B5, false); y += 12; - fontRendererObj.drawString("Windup: " + selectedAbility.getWindUpTicks() + "t", x, y, 0xB5B5B5, false); + fontRendererObj.drawString(StatCollector.translateToLocal("ability.windup") + ": " + selectedAbility.getWindUpTicks() + "t", x, y, 0xB5B5B5, false); y += 12; UserType ut = selectedAbility.getAllowedBy(); - fontRendererObj.drawString("Allowed: " + ut.name(), x, y, 0xB5B5B5, false); + fontRendererObj.drawString(StatCollector.translateToLocal("ability.allowed") + ": " + ut.name(), x, y, 0xB5B5B5, false); if (selectedAbility.hasDamage()) { y += 12; - fontRendererObj.drawString("Damage: " + selectedAbility.getDisplayDamage(), x, y, 0xFF5555, false); + fontRendererObj.drawString(StatCollector.translateToLocal("ability.damage") + ": " + selectedAbility.getDisplayDamage(), x, y, 0xFF5555, false); } if (currentIsBuiltIn) { y += 12; - fontRendererObj.drawString("(Built-in)", x, y, 0x55FF55, false); + fontRendererObj.drawString(StatCollector.translateToLocal("gui.builtin.tag"), x, y, 0x55FF55, false); } } } diff --git a/src/main/java/noppes/npcs/client/gui/global/GuiAnimationDirectory.java b/src/main/java/noppes/npcs/client/gui/global/GuiAnimationDirectory.java index 5cc629a4a..e62c2dc81 100644 --- a/src/main/java/noppes/npcs/client/gui/global/GuiAnimationDirectory.java +++ b/src/main/java/noppes/npcs/client/gui/global/GuiAnimationDirectory.java @@ -19,6 +19,7 @@ import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.entity.EntityLivingBase; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.StatCollector; import noppes.npcs.client.NoppesUtil; import noppes.npcs.client.gui.util.GuiCustomScroll; import noppes.npcs.client.gui.util.GuiDirectoryCategorized; @@ -263,10 +264,13 @@ public class GuiAnimationDirectory extends GuiDirectoryCategorized { @Override protected void initRightPanel(int startY) { - // Calculate layout: playback row + edit/copy + remove rows + // Calculate layout: playback rows + edit/copy + remove rows int bottomRows = 2; // edit+copy, remove boolean hasPlayback = animation != null && !animation.frames.isEmpty() && hasSelectedItem(); - if (hasPlayback) bottomRows++; // playback row + if (hasPlayback) { + bottomRows++; // playback controls row + if (playingAnimation) bottomRows++; // frame info row + } int bottomH = bottomRows * (btnH + gap) + 14; previewX = rightX; @@ -283,15 +287,17 @@ public class GuiAnimationDirectory extends GuiDirectoryCategorized { if (!playingAnimation || (data.animation != null && data.animation.paused)) { String statusKey = (data.animation != null && data.animation.paused) ? "animation.paused" : "animation.stopped"; - addLabel(new GuiNpcLabel(90, statusKey, btnX, playY + 5)); + addLabel(new GuiNpcLabel(90, statusKey, btnX, playY + 5, 0xFFFFFF)); addButton(new GuiTexturedButton(91, "", btnX + 65, playY, 11, 20, animTexture, 18, 71)); } else { - addLabel(new GuiNpcLabel(90, "animation.playing", btnX, playY + 5)); - addLabel(new GuiNpcLabel(94, "", btnX + 60, playY + 5)); + addLabel(new GuiNpcLabel(90, "animation.playing", btnX, playY + 5, 0xFFFFFF)); addButton(new GuiTexturedButton(92, "", btnX + 65, playY, 14, 20, animTexture, 0, 71)); } if (playingAnimation) { addButton(new GuiTexturedButton(93, "", btnX + 85, playY, 14, 20, animTexture, 33, 71)); + // Frame info on its own line below playback controls + int frameInfoY = playY + btnH + gap; + addLabel(new GuiNpcLabel(94, "", btnX, frameInfoY + 5, 0xFFFFFF)); } } @@ -498,15 +504,15 @@ public class GuiAnimationDirectory extends GuiDirectoryCategorized { fontRendererObj.drawString(animation.name, x, y, 0xFFFFFF, true); y += 14; - fontRendererObj.drawString("Frames: " + animation.frames.size(), x, y, 0xB5B5B5, false); + fontRendererObj.drawString(StatCollector.translateToLocal("animation.frames") + ": " + animation.frames.size(), x, y, 0xB5B5B5, false); y += 12; - fontRendererObj.drawString("Speed: " + animation.speed, x, y, 0xB5B5B5, false); + fontRendererObj.drawString(StatCollector.translateToLocal("stats.speed") + ": " + animation.speed, x, y, 0xB5B5B5, false); y += 12; - String loopStr = animation.loop == 0 ? "None" : animation.loop == 1 ? "Loop" : "Mirror"; - fontRendererObj.drawString("Loop: " + loopStr, x, y, 0xB5B5B5, false); + String loopStr = animation.loop == 0 ? StatCollector.translateToLocal("gui.none") : animation.loop == 1 ? StatCollector.translateToLocal("animation.loop") : StatCollector.translateToLocal("animation.mirror"); + fontRendererObj.drawString(StatCollector.translateToLocal("animation.loop") + ": " + loopStr, x, y, 0xB5B5B5, false); if (currentIsBuiltIn) { y += 12; - fontRendererObj.drawString("(Built-in)", x, y, 0x55FF55, false); + fontRendererObj.drawString(StatCollector.translateToLocal("gui.builtin.tag"), x, y, 0x55FF55, false); } } diff --git a/src/main/java/noppes/npcs/client/gui/global/GuiEffectDirectory.java b/src/main/java/noppes/npcs/client/gui/global/GuiEffectDirectory.java index ef1ad314d..c6af6597d 100644 --- a/src/main/java/noppes/npcs/client/gui/global/GuiEffectDirectory.java +++ b/src/main/java/noppes/npcs/client/gui/global/GuiEffectDirectory.java @@ -15,7 +15,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; import noppes.npcs.client.ClientCacheHandler; -import noppes.npcs.client.CustomNpcResourceListener; import noppes.npcs.client.gui.SubGuiEffectGeneral; import noppes.npcs.client.gui.util.GuiDirectoryCategorized; import noppes.npcs.client.gui.util.SubGuiInterface; @@ -180,7 +179,7 @@ public class GuiEffectDirectory extends GuiDirectoryCategorized { if (effect == null || effect.id == -1) return; String drawString = effect.getMenuName(); - fontRendererObj.drawString(drawString, x, y, CustomNpcResourceListener.DefaultTextColor, true); + fontRendererObj.drawString(drawString, x, y, 0xFFFFFF, true); y += 14; fontRendererObj.drawString(StatCollector.translateToLocal("gui.name") + ": " + effect.name, x, y, 0xFFFFFF, false); diff --git a/src/main/java/noppes/npcs/client/gui/global/GuiLinkedItemDirectory.java b/src/main/java/noppes/npcs/client/gui/global/GuiLinkedItemDirectory.java index 86199b818..2b9744758 100644 --- a/src/main/java/noppes/npcs/client/gui/global/GuiLinkedItemDirectory.java +++ b/src/main/java/noppes/npcs/client/gui/global/GuiLinkedItemDirectory.java @@ -17,7 +17,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; import noppes.npcs.client.ClientCacheHandler; -import noppes.npcs.client.CustomNpcResourceListener; import net.minecraft.client.gui.GuiButton; import noppes.npcs.client.gui.item.SubGuiLinkedItem; import noppes.npcs.client.gui.util.GuiDirectoryCategorized; @@ -215,7 +214,7 @@ public class GuiLinkedItemDirectory extends GuiDirectoryCategorized { protected void drawItemDetails(int x, int y, int w) { if (linkedItem == null || linkedItem.id < 0) return; - fontRendererObj.drawString(linkedItem.name, x, y, CustomNpcResourceListener.DefaultTextColor, true); + fontRendererObj.drawString(linkedItem.name, x, y, 0xFFFFFF, true); y += 14; int labelColor = 0xffae0d; diff --git a/src/main/java/noppes/npcs/client/gui/util/GuiDirectoryCategorized.java b/src/main/java/noppes/npcs/client/gui/util/GuiDirectoryCategorized.java index 5c49d3dcc..38c508756 100644 --- a/src/main/java/noppes/npcs/client/gui/util/GuiDirectoryCategorized.java +++ b/src/main/java/noppes/npcs/client/gui/util/GuiDirectoryCategorized.java @@ -184,7 +184,7 @@ public abstract class GuiDirectoryCategorized extends GuiDirectory x += topBtnW + 2; // MOVE - String moveLabel = movePhase > 0 ? "Moving" : "Move"; + String moveLabel = movePhase > 0 ? "gui.moving" : "gui.move"; GuiNpcButton moveBtn = new GuiNpcButton(54, x, topBtnY, topBtnW, btnH, moveLabel); moveBtn.enabled = selectedCatId >= 0 && !leftCollapsed && hasCategories(); addButton(moveBtn); @@ -192,8 +192,9 @@ public abstract class GuiDirectoryCategorized extends GuiDirectory // Confirm (only during move phase 1) if (movePhase == 1) { - GuiNpcButton confirmBtn = new GuiNpcButton(55, x, topBtnY, topBtnW, btnH, "Confirm"); + GuiNpcButton confirmBtn = new GuiNpcButton(55, x, topBtnY, topBtnW, btnH, "gui.confirm"); confirmBtn.enabled = !moveSelection.isEmpty(); + confirmBtn.setTextColor(0x55FFFF); addButton(confirmBtn); x += topBtnW + 2; } @@ -230,6 +231,13 @@ public abstract class GuiDirectoryCategorized extends GuiDirectory catScroll.setSelected(prevCatName); catScroll.scrollY = Math.max(0, Math.min(savedCatScrollY, catScroll.maxScrollY)); + // Phase 1: categories are locked (RED labels, not clickable) + if (movePhase == 1) { + catScroll.setSelectable(false); + for (String name : navNames) { + catScroll.colors.put(name, 0xFF5555); + } + } // Phase 2: ensure scroll is clickable for destination selection if (movePhase == 2) { catScroll.setSelectable(true); @@ -391,19 +399,19 @@ public abstract class GuiDirectoryCategorized extends GuiDirectory // Draw ID (skip if -1, e.g. abilities use names not IDs) if (hasSelectedItem() && getSelectedItemId() >= 0) { - String idStr = "ID: " + getSelectedItemId(); - int idY = contentY + contentH - btnH - 14; + String idStr = StatCollector.translateToLocal("gui.id") + ": " + getSelectedItemId(); + int idY = contentY + contentH - btnH * 2 - gap - 12; fontRendererObj.drawString(idStr, previewX + 4, idY, 0xFFFFFF, true); } } // Move phase overlay text if (movePhase == 1) { - String text = "Select Items to Move (max " + MAX_MOVE_ITEMS + ")"; + String text = String.format(StatCollector.translateToLocal("gui.move.selectItems"), MAX_MOVE_ITEMS); int textW = fontRendererObj.getStringWidth(text); fontRendererObj.drawStringWithShadow(text, width / 2 - textW / 2, height - pad - 10, 0x55FF55); } else if (movePhase == 2) { - String text = "Select Destination Category"; + String text = StatCollector.translateToLocal("gui.move.selectCategory"); int textW = fontRendererObj.getStringWidth(text); fontRendererObj.drawStringWithShadow(text, width / 2 - textW / 2, height - pad - 10, 0xFF5555); } @@ -592,6 +600,9 @@ public abstract class GuiDirectoryCategorized extends GuiDirectory public void customScrollClicked(int i, int j, int k, GuiCustomScroll guiCustomScroll) { // Category scroll if (guiCustomScroll.id == 2) { + // Block category clicks during move phase 1 (selecting items) + if (movePhase == 1) return; + String selected = catScroll.getSelected(); if (selected == null) return; diff --git a/src/main/java/noppes/npcs/client/gui/util/GuiNpcButton.java b/src/main/java/noppes/npcs/client/gui/util/GuiNpcButton.java index 2c0d51a18..489069610 100644 --- a/src/main/java/noppes/npcs/client/gui/util/GuiNpcButton.java +++ b/src/main/java/noppes/npcs/client/gui/util/GuiNpcButton.java @@ -5,6 +5,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.ScaledResolution; +import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.RenderHelper; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; @@ -166,8 +167,13 @@ public class GuiNpcButton extends GuiButton { } } } - // First, draw the button normally using the superclass method. - super.drawButton(mc, mouseX, mouseY); + // Wide buttons (>396px) break the vanilla 200px button texture. + // Draw them with a three-patch approach instead. + if (this.width > 396) { + drawWideButton(mc, mouseX, mouseY); + } else { + super.drawButton(mc, mouseX, mouseY); + } // Restore original display string this.displayString = original; // Then, if an icon texture is set, draw it. @@ -175,17 +181,58 @@ public class GuiNpcButton extends GuiButton { mc.getTextureManager().bindTexture(iconTexture); GL11.glPushMatrix(); RenderHelper.enableGUIStandardItemLighting(); - // Calculate the icon position so that it's centered in the button. - // (Assumes the button's (xPosition,yPosition) is its top left.) int iconX = this.xPosition + (this.width - iconWidth) / 2; int iconY = this.yPosition + (this.height - iconHeight) / 2; - // Draw the texture; we assume texture coordinates start at (0,0) with the desired size. this.drawTexturedModalRect(iconX, iconY, iconPosX, iconPosY, iconWidth, iconHeight); RenderHelper.disableStandardItemLighting(); GL11.glPopMatrix(); } } + /** + * Draws a button wider than the vanilla 200px texture allows. + * Uses three-patch rendering: left cap, tiled center, right cap. + */ + private void drawWideButton(Minecraft mc, int mouseX, int mouseY) { + FontRenderer fontrenderer = mc.fontRenderer; + mc.getTextureManager().bindTexture(buttonTextures); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.field_146123_n = mouseX >= this.xPosition && mouseY >= this.yPosition + && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height; + int k = this.getHoverState(this.field_146123_n); + GL11.glEnable(GL11.GL_BLEND); + OpenGlHelper.glBlendFunc(770, 771, 1, 0); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + + int texY = 46 + k * 20; + int cap = 100; + + // Left cap (first 100px of texture) + this.drawTexturedModalRect(this.xPosition, this.yPosition, 0, texY, cap, this.height); + // Right cap (last 100px of texture) + this.drawTexturedModalRect(this.xPosition + this.width - cap, this.yPosition, 200 - cap, texY, cap, this.height); + // Tile the center column to fill the gap + int gapStart = this.xPosition + cap; + int gapEnd = this.xPosition + this.width - cap; + for (int x = gapStart; x < gapEnd; x += 2) { + int drawW = Math.min(2, gapEnd - x); + this.drawTexturedModalRect(x, this.yPosition, 99, texY, drawW, this.height); + } + + this.mouseDragged(mc, mouseX, mouseY); + + int l = 14737632; + if (packedFGColour != 0) { + l = packedFGColour; + } else if (!this.enabled) { + l = 10526880; + } else if (this.field_146123_n) { + l = 16777120; + } + this.drawCenteredString(fontrenderer, this.displayString, + this.xPosition + this.width / 2, this.yPosition + (this.height - 8) / 2, l); + } + public void drawHover(int i, int j, boolean hasSubGui) { if (hasSubGui || !visible || hoverableText.isEmpty()) return; diff --git a/src/main/resources/assets/customnpcs/lang/en_US.lang b/src/main/resources/assets/customnpcs/lang/en_US.lang index f375c56c2..d94408caa 100644 --- a/src/main/resources/assets/customnpcs/lang/en_US.lang +++ b/src/main/resources/assets/customnpcs/lang/en_US.lang @@ -2459,3 +2459,14 @@ global.auction.manage.confirm.claim=Left-click again to confirm claim global.auction.manage.error.noItem=Stage an item first global.auction.manage.error.invalidStart=Enter a valid starting price global.auction.manage.error.invalidBuyout=Buyout must be zero or >= start + +# Directory Fullscreen +gui.move=Move +gui.moving=Moving +gui.confirm=Confirm +gui.move.selectItems=Select Items to Move (max %d) Press Confirm when Ready +gui.move.selectCategory=Select Destination Category +animation.mirror=Mirror +gui.builtin.tag=(Built-in) +ability.damage=Damage +ability.allowed=Allowed From 07ebe90437c34fbe3e1e5447b5caf5135329fa10 Mon Sep 17 00:00:00 2001 From: Kam Date: Mon, 9 Mar 2026 22:56:09 -0400 Subject: [PATCH 4/8] Fix Barrier Collision Logic --- src/main/java/kamkeel/npcs/entity/EntityEnergyBarrier.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/kamkeel/npcs/entity/EntityEnergyBarrier.java b/src/main/java/kamkeel/npcs/entity/EntityEnergyBarrier.java index 9683c2894..4ccb01269 100644 --- a/src/main/java/kamkeel/npcs/entity/EntityEnergyBarrier.java +++ b/src/main/java/kamkeel/npcs/entity/EntityEnergyBarrier.java @@ -741,6 +741,13 @@ public abstract class EntityEnergyBarrier extends EntityEnergyAbility { double px = ent.posX + dirX * probe; double py = ent.posY + dirY * probe; double pz = ent.posZ + dirZ * probe; + // Never probe below the entity's feet — a downward probe always detects the + // block the entity is already standing/hovering above (false positive). + // MC's own collision system prevents entities from falling through floors, + // so the downward check is redundant. Upward probes (ceiling detection) still work. + if (py < ent.posY) { + py = ent.posY; + } AxisAlignedBB box = AxisAlignedBB.getBoundingBox( px - halfW, py, pz - halfW, px + halfW, py + ent.height, pz + halfW From 248b56ec1f79831e992db2cd3698b1d0674c72c9 Mon Sep 17 00:00:00 2001 From: Kam Date: Mon, 9 Mar 2026 22:56:22 -0400 Subject: [PATCH 5/8] Move Confirmation --- .../gui/global/GuiAbilityDirectory.java | 2 + .../gui/global/GuiAnimationDirectory.java | 5 ++ .../gui/util/GuiDirectoryCategorized.java | 30 +++++++++--- .../gui/util/SubGuiCategoryMoveConfirm.java | 48 +++++++++++++++++++ .../assets/customnpcs/lang/en_US.lang | 2 + 5 files changed, 80 insertions(+), 7 deletions(-) create mode 100644 src/main/java/noppes/npcs/client/gui/util/SubGuiCategoryMoveConfirm.java diff --git a/src/main/java/noppes/npcs/client/gui/global/GuiAbilityDirectory.java b/src/main/java/noppes/npcs/client/gui/global/GuiAbilityDirectory.java index 7599bb18e..d9c82f45a 100644 --- a/src/main/java/noppes/npcs/client/gui/global/GuiAbilityDirectory.java +++ b/src/main/java/noppes/npcs/client/gui/global/GuiAbilityDirectory.java @@ -847,9 +847,11 @@ public class GuiAbilityDirectory extends GuiDirectoryCategorized GL11.glTranslatef(0.0F, entity.yOffset, 1F); RenderManager.instance.playerViewY = 180F; + ClientEventHandler.renderingEntityInGUI = true; try { RenderManager.instance.renderEntityWithPosYaw(entity, 0.0, 0.0, 0.0, 0.0F, 1.0F); } catch (Exception ignored) {} + ClientEventHandler.renderingEntityInGUI = false; entity.prevRenderYawOffset = entity.renderYawOffset = f2; entity.prevRotationYaw = entity.rotationYaw = f3; diff --git a/src/main/java/noppes/npcs/client/gui/global/GuiAnimationDirectory.java b/src/main/java/noppes/npcs/client/gui/global/GuiAnimationDirectory.java index e62c2dc81..6a5aeb478 100644 --- a/src/main/java/noppes/npcs/client/gui/global/GuiAnimationDirectory.java +++ b/src/main/java/noppes/npcs/client/gui/global/GuiAnimationDirectory.java @@ -35,6 +35,7 @@ import noppes.npcs.controllers.data.AnimationData; import noppes.npcs.controllers.data.Category; import noppes.npcs.controllers.data.Frame; import noppes.npcs.controllers.data.FramePart; +import noppes.npcs.client.ClientEventHandler; import noppes.npcs.entity.EntityCustomNpc; import noppes.npcs.entity.EntityNPCInterface; import org.lwjgl.opengl.GL11; @@ -478,10 +479,12 @@ public class GuiAnimationDirectory extends GuiDirectoryCategorized { GL11.glTranslatef(0.0F, entity.yOffset, 1F); RenderManager.instance.playerViewY = 180F; + ClientEventHandler.renderingEntityInGUI = true; try { RenderManager.instance.renderEntityWithPosYaw(entity, 0.0, 0.0, 0.0, 0.0F, 1.0F); } catch (Exception ignored) { } + ClientEventHandler.renderingEntityInGUI = false; entity.prevRenderYawOffset = entity.renderYawOffset = f2; entity.prevRotationYaw = entity.rotationYaw = f3; @@ -493,6 +496,8 @@ public class GuiAnimationDirectory extends GuiDirectoryCategorized { OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit); GL11.glDisable(GL11.GL_TEXTURE_2D); OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); + GL11.glDisable(GL11.GL_COLOR_MATERIAL); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT); GL11.glPopMatrix(); } diff --git a/src/main/java/noppes/npcs/client/gui/util/GuiDirectoryCategorized.java b/src/main/java/noppes/npcs/client/gui/util/GuiDirectoryCategorized.java index 38c508756..04717d8ed 100644 --- a/src/main/java/noppes/npcs/client/gui/util/GuiDirectoryCategorized.java +++ b/src/main/java/noppes/npcs/client/gui/util/GuiDirectoryCategorized.java @@ -63,6 +63,10 @@ public abstract class GuiDirectoryCategorized extends GuiDirectory // ========== New Item Category ========== protected int pendingNewItemCatId = -1; + // ========== Pending Move Destination ========== + private int pendingMoveDestCatId = -1; + private String pendingMoveDestName = ""; + // ========== Category Data Loaded ========== private boolean itemDataLoaded = false; @@ -231,16 +235,16 @@ public abstract class GuiDirectoryCategorized extends GuiDirectory catScroll.setSelected(prevCatName); catScroll.scrollY = Math.max(0, Math.min(savedCatScrollY, catScroll.maxScrollY)); - // Phase 1: categories are locked (RED labels, not clickable) + // Phase 1: categories locked (not clickable) if (movePhase == 1) { catScroll.setSelectable(false); - for (String name : navNames) { - catScroll.colors.put(name, 0xFF5555); - } } - // Phase 2: ensure scroll is clickable for destination selection + // Phase 2: color nav items orange (selectable) or red (current/source category) if (movePhase == 2) { catScroll.setSelectable(true); + for (String name : navNames) { + catScroll.colors.put(name, name.equals(prevCatName) ? 0xFF5555 : 0xFFAA00); + } } addScroll(catScroll); @@ -606,12 +610,14 @@ public abstract class GuiDirectoryCategorized extends GuiDirectory String selected = catScroll.getSelected(); if (selected == null) return; - // Move phase 2: destination selected + // Move phase 2: destination selected — show confirmation if (movePhase == 2) { if (!selected.equals(prevCatName)) { Integer destCatId = catData.get(selected); if (destCatId != null) { - executeMoveItems(destCatId); + pendingMoveDestCatId = destCatId; + pendingMoveDestName = selected; + setSubGui(new SubGuiCategoryMoveConfirm(moveSelection.size(), selected)); } } return; @@ -772,6 +778,16 @@ public abstract class GuiDirectoryCategorized extends GuiDirectory } } } + if (subgui instanceof SubGuiCategoryMoveConfirm) { + SubGuiCategoryMoveConfirm confirm = (SubGuiCategoryMoveConfirm) subgui; + if (confirm.confirmed && !moveSelection.isEmpty() && pendingMoveDestCatId >= 0) { + executeMoveItems(pendingMoveDestCatId); + } else { + // Cancelled — stay in phase 2 + } + pendingMoveDestCatId = -1; + pendingMoveDestName = ""; + } onSubGuiClosed(subgui); } diff --git a/src/main/java/noppes/npcs/client/gui/util/SubGuiCategoryMoveConfirm.java b/src/main/java/noppes/npcs/client/gui/util/SubGuiCategoryMoveConfirm.java new file mode 100644 index 000000000..d4b7e79ea --- /dev/null +++ b/src/main/java/noppes/npcs/client/gui/util/SubGuiCategoryMoveConfirm.java @@ -0,0 +1,48 @@ +package noppes.npcs.client.gui.util; + +import net.minecraft.client.gui.GuiButton; +import net.minecraft.util.StatCollector; + +public class SubGuiCategoryMoveConfirm extends SubGuiInterface { + public boolean confirmed = false; + + private final int count; + public final String destCategoryName; + + public SubGuiCategoryMoveConfirm(int count, String destCategoryName) { + this.count = count; + this.destCategoryName = destCategoryName; + xSize = 220; + ySize = 90; + closeOnEsc = true; + } + + @Override + public void initGui() { + super.initGui(); + + String line1 = String.format(StatCollector.translateToLocal("gui.move.confirmLine"), count); + addLabel(new GuiNpcLabel(0, line1, guiLeft + 10, guiTop + 10, 0xFFFFFF)); + + String dest = StatCollector.translateToLocal("gui.category") + ": \"" + destCategoryName + "\""; + addLabel(new GuiNpcLabel(1, " " + dest, guiLeft + 10, guiTop + 25, 0xFFFFFF)); + + addButton(new GuiNpcButton(0, guiLeft + 10, guiTop + 55, 95, 20, "gui.yes")); + addButton(new GuiNpcButton(1, guiLeft + 115, guiTop + 55, 95, 20, "gui.cancel")); + } + + @Override + protected void actionPerformed(GuiButton guibutton) { + if (guibutton.id == 0) { + confirmed = true; + close(); + } + if (guibutton.id == 1) { + close(); + } + } + + @Override + public void save() { + } +} diff --git a/src/main/resources/assets/customnpcs/lang/en_US.lang b/src/main/resources/assets/customnpcs/lang/en_US.lang index d94408caa..13fa4fc07 100644 --- a/src/main/resources/assets/customnpcs/lang/en_US.lang +++ b/src/main/resources/assets/customnpcs/lang/en_US.lang @@ -2470,3 +2470,5 @@ animation.mirror=Mirror gui.builtin.tag=(Built-in) ability.damage=Damage ability.allowed=Allowed +gui.move.confirmLine=Move %d item(s) to: +gui.category=Category From b6b6eb554896d075a1ad8fe93ff5bdc4e9424083 Mon Sep 17 00:00:00 2001 From: Kam Date: Mon, 9 Mar 2026 23:03:53 -0400 Subject: [PATCH 6/8] Fix Some Selection Logic and Such in the Fullscreen Move Systems --- .../gui/GuiNpcMobSpawnerFullscreen.java | 2 +- .../advanced/SubGuiAbilityVariantSelect.java | 5 +++- .../npcs/client/gui/util/GuiCustomScroll.java | 23 +++++++++++-------- .../gui/util/GuiDirectoryCategorized.java | 2 ++ 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/src/main/java/noppes/npcs/client/gui/GuiNpcMobSpawnerFullscreen.java b/src/main/java/noppes/npcs/client/gui/GuiNpcMobSpawnerFullscreen.java index 80e0a971f..eabc33fee 100644 --- a/src/main/java/noppes/npcs/client/gui/GuiNpcMobSpawnerFullscreen.java +++ b/src/main/java/noppes/npcs/client/gui/GuiNpcMobSpawnerFullscreen.java @@ -199,7 +199,7 @@ public class GuiNpcMobSpawnerFullscreen extends GuiDirectory implements IGuiData navScroll.setSelected(getNavSelection()); navScroll.scrollY = Math.min(savedNavScroll, Math.max(0, navScroll.maxScrollY)); - // Phase 2: color nav items orange (selectable) or red (current location, not selectable) + // Phase 2: color nav items orange (selectable) or red (current location) if (movePhase == 2) { String currentNav = getNavSelection(); for (String name : navNames) { diff --git a/src/main/java/noppes/npcs/client/gui/advanced/SubGuiAbilityVariantSelect.java b/src/main/java/noppes/npcs/client/gui/advanced/SubGuiAbilityVariantSelect.java index 1c65d0dc6..be7ba5645 100644 --- a/src/main/java/noppes/npcs/client/gui/advanced/SubGuiAbilityVariantSelect.java +++ b/src/main/java/noppes/npcs/client/gui/advanced/SubGuiAbilityVariantSelect.java @@ -88,12 +88,15 @@ public class SubGuiAbilityVariantSelect extends SubGuiInterface implements ICust scroll.setSize(190, 155); // Mark blank separators and group headers as non-interactive colored entries + scroll.nonInteractive.add(""); scroll.colors.put("", 0x000000); if (lastGroup != null) { for (int i = 0; i < variants.size(); i++) { String group = variants.get(i).getGroup(); - if (group != null) + if (group != null) { + scroll.nonInteractive.add(group); scroll.colors.put(group, 0xFFFF00); // Yellow + } } } diff --git a/src/main/java/noppes/npcs/client/gui/util/GuiCustomScroll.java b/src/main/java/noppes/npcs/client/gui/util/GuiCustomScroll.java index f9b3df568..fc8bf30eb 100644 --- a/src/main/java/noppes/npcs/client/gui/util/GuiCustomScroll.java +++ b/src/main/java/noppes/npcs/client/gui/util/GuiCustomScroll.java @@ -19,6 +19,7 @@ public class GuiCustomScroll extends GuiScreen { public static final ResourceLocation resource = new ResourceLocation("customnpcs", "textures/gui/misc.png"); public List list; public final HashMap colors = new HashMap<>(); + public final HashSet nonInteractive = new HashSet<>(); public int id; public int guiLeft = 0; @@ -217,21 +218,25 @@ public class GuiCustomScroll extends GuiScreen { } else text = displayString; - // Entries with a custom color are non-interactive (headers/separators) + // Non-interactive entries (headers/separators) — colored, no hover/selection Integer customColor = colors.get(rawEntry); - if (customColor != null) { + if (nonInteractive.contains(rawEntry)) { if (!text.isEmpty()) - fontRendererObj.drawString(text, j, k, customColor); + fontRendererObj.drawString(text, j, k, customColor != null ? customColor : 0xffffff); } else if ((multipleSelection && selectedList.contains(text)) || (!multipleSelection && selected == i)) { drawVerticalLine(j - 2, k - 4, k + 10, 0xffffffff); drawVerticalLine(j + xSize - 18 + xOffset, k - 4, k + 10, 0xffffffff); drawHorizontalLine(j - 2, j + xSize - 18 + xOffset, k - 3, 0xffffffff); drawHorizontalLine(j - 2, j + xSize - 18 + xOffset, k + 10, 0xffffffff); - fontRendererObj.drawString(text, j, k, 0xffffff); + int selColor = customColor != null ? customColor : 0xffffff; + fontRendererObj.drawString(text, j, k, selColor); } else if (i == hover) { - fontRendererObj.drawString(text, j, k, 0x00ff00); - } else - fontRendererObj.drawString(text, j, k, 0xffffff); + int hoverColor = customColor != null ? customColor : 0x00ff00; + fontRendererObj.drawString(text, j, k, hoverColor); + } else { + int defaultColor = customColor != null ? customColor : 0xffffff; + fontRendererObj.drawString(text, j, k, defaultColor); + } } } @@ -252,8 +257,8 @@ public class GuiCustomScroll extends GuiScreen { continue; } - // Skip non-interactive entries (colored headers/separators) - if (colors.containsKey(list.get(j1))) { + // Skip non-interactive entries (headers/separators) + if (nonInteractive.contains(list.get(j1))) { continue; } diff --git a/src/main/java/noppes/npcs/client/gui/util/GuiDirectoryCategorized.java b/src/main/java/noppes/npcs/client/gui/util/GuiDirectoryCategorized.java index 04717d8ed..e8be1249a 100644 --- a/src/main/java/noppes/npcs/client/gui/util/GuiDirectoryCategorized.java +++ b/src/main/java/noppes/npcs/client/gui/util/GuiDirectoryCategorized.java @@ -245,6 +245,8 @@ public abstract class GuiDirectoryCategorized extends GuiDirectory for (String name : navNames) { catScroll.colors.put(name, name.equals(prevCatName) ? 0xFF5555 : 0xFFAA00); } + } else if (movePhase == 0) { + catScroll.setSelectable(true); } addScroll(catScroll); From 5fda8a2de9297ab26c8cf58576e2457372f52c4b Mon Sep 17 00:00:00 2001 From: Kam Date: Mon, 9 Mar 2026 23:40:56 -0400 Subject: [PATCH 7/8] Fix Rendering / Selection --- .../npcs/client/gui/global/GuiAbilityDirectory.java | 8 +++----- .../npcs/client/gui/global/GuiAnimationDirectory.java | 4 +--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/main/java/noppes/npcs/client/gui/global/GuiAbilityDirectory.java b/src/main/java/noppes/npcs/client/gui/global/GuiAbilityDirectory.java index d9c82f45a..0fc52f08b 100644 --- a/src/main/java/noppes/npcs/client/gui/global/GuiAbilityDirectory.java +++ b/src/main/java/noppes/npcs/client/gui/global/GuiAbilityDirectory.java @@ -741,6 +741,8 @@ public class GuiAbilityDirectory extends GuiDirectoryCategorized * Matches GuiAbilityInterface's rendering pipeline. */ private void drawAbilityPreview(float partialTicks) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + // Set NPC facing direction npc.prevRenderYawOffset = npc.renderYawOffset = NPC_FACING_YAW; npc.prevRotationYaw = npc.rotationYaw = NPC_FACING_YAW; @@ -806,8 +808,6 @@ public class GuiAbilityDirectory extends GuiDirectoryCategorized OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit); GL11.glDisable(GL11.GL_TEXTURE_2D); OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); - GL11.glDisable(GL11.GL_COLOR_MATERIAL); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glDisable(GL11.GL_SCISSOR_TEST); GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT); @@ -857,16 +857,14 @@ public class GuiAbilityDirectory extends GuiDirectoryCategorized entity.prevRotationYaw = entity.rotationYaw = f3; entity.rotationPitch = f4; entity.prevRotationYawHead = entity.rotationYawHead = f7; + GL11.glPopMatrix(); RenderHelper.disableStandardItemLighting(); GL11.glDisable(GL12.GL_RESCALE_NORMAL); OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit); GL11.glDisable(GL11.GL_TEXTURE_2D); OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); - GL11.glDisable(GL11.GL_COLOR_MATERIAL); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT); - GL11.glPopMatrix(); } private void renderPreviewEntities(float partialTicks) { diff --git a/src/main/java/noppes/npcs/client/gui/global/GuiAnimationDirectory.java b/src/main/java/noppes/npcs/client/gui/global/GuiAnimationDirectory.java index 6a5aeb478..df6cd58b2 100644 --- a/src/main/java/noppes/npcs/client/gui/global/GuiAnimationDirectory.java +++ b/src/main/java/noppes/npcs/client/gui/global/GuiAnimationDirectory.java @@ -490,16 +490,14 @@ public class GuiAnimationDirectory extends GuiDirectoryCategorized { entity.prevRotationYaw = entity.rotationYaw = f3; entity.rotationPitch = f4; entity.prevRotationYawHead = entity.rotationYawHead = f7; + GL11.glPopMatrix(); RenderHelper.disableStandardItemLighting(); GL11.glDisable(GL12.GL_RESCALE_NORMAL); OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit); GL11.glDisable(GL11.GL_TEXTURE_2D); OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); - GL11.glDisable(GL11.GL_COLOR_MATERIAL); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT); - GL11.glPopMatrix(); } @Override From 3d1a0b5418fbeb39d23e05dbef0f468dc741895f Mon Sep 17 00:00:00 2001 From: Kam Date: Mon, 9 Mar 2026 23:56:12 -0400 Subject: [PATCH 8/8] 1.11 Pre Release 3 --- build.gradle | 2 +- src/main/java/noppes/npcs/CustomNpcs.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 6826ce5d5..9c56b2e2e 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ plugins { id 'idea' } -version = "1.11-prerelease2" +version = "1.11-prerelease3" group= "kamkeel.customnpc-plus" archivesBaseName = "CustomNPC-Plus" diff --git a/src/main/java/noppes/npcs/CustomNpcs.java b/src/main/java/noppes/npcs/CustomNpcs.java index 67a55f58d..cfd3ad7bb 100644 --- a/src/main/java/noppes/npcs/CustomNpcs.java +++ b/src/main/java/noppes/npcs/CustomNpcs.java @@ -124,7 +124,7 @@ import java.util.HashSet; import java.util.Set; import java.util.function.Consumer; -@Mod(modid = "customnpcs", name = "CustomNPC+", version = "1.11-prerelease2") +@Mod(modid = "customnpcs", name = "CustomNPC+", version = "1.11-prerelease3") public class CustomNpcs { @SidedProxy(clientSide = "noppes.npcs.client.ClientProxy", serverSide = "noppes.npcs.CommonProxy")