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

This commit is contained in:
Kam committed 2026-02-24 19:05:27 -05:00
commit 5128086ebe
10 files changed
+25 -8

No files matched your search

@@ -13,10 +13,13 @@ import kamkeel.npcs.util.ByteBufUtils;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.nbt.NBTTagCompound;
import kamkeel.npcs.network.packets.data.large.GuiDataPacket;
import noppes.npcs.CustomNpcsPermissions;
import noppes.npcs.NoppesUtilServer;
import noppes.npcs.controllers.DialogController;
import noppes.npcs.controllers.QuestController;
import noppes.npcs.controllers.data.Dialog;
import noppes.npcs.controllers.data.Quest;
import java.io.IOException;
@@ -80,6 +83,13 @@ public final class DialogSavePacket extends AbstractPacket {
} else {
NoppesUtilServer.sendDialogData((EntityPlayerMP) player, dialog.category);
}
// Send full dialog data back so the client doesn't need a second round-trip
NBTTagCompound dialogData = dialog.writeToNBT(new NBTTagCompound());
Quest quest = QuestController.Instance.quests.get(dialog.quest);
if (quest != null)
dialogData.setString("DialogQuestName", quest.title);
GuiDataPacket.sendGuiData((EntityPlayerMP) player, dialogData);
}
}
}
@@ -13,6 +13,7 @@ import kamkeel.npcs.util.ByteBufUtils;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.nbt.NBTTagCompound;
import kamkeel.npcs.network.packets.data.large.GuiDataPacket;
import noppes.npcs.CustomNpcsPermissions;
import noppes.npcs.NoppesUtilServer;
import noppes.npcs.controllers.QuestController;
@@ -79,6 +80,12 @@ public final class QuestSavePacket extends AbstractPacket {
} else {
NoppesUtilServer.sendQuestData((EntityPlayerMP) player, quest.category);
}
// Send full quest data back so the client doesn't need a second round-trip
NBTTagCompound questData = new NBTTagCompound();
if (quest.hasNewQuest())
questData.setString("NextQuestTitle", quest.getNextQuest().title);
GuiDataPacket.sendGuiData((EntityPlayerMP) player, quest.writeToNBT(questData));
}
}
}
@@ -28,7 +28,7 @@ public class GuiNpcPather extends GuiNPCInterface implements IGuiData {
drawDefaultBackground = false;
xSize = 176;
title = "Npc Pather";
setBackground("smallbg.png");
setBackground("menubg.png");
ai = npc.ais;
PacketClient.sendClient(new MovingPathGetPacket());
}
@@ -13,7 +13,7 @@ public class SubGuiAnimationFrame extends SubGuiInterface implements ITextfieldL
public SubGuiAnimationFrame(Frame editingFrame) {
this.editingFrame = editingFrame;
setBackground("smallbg.png");
setBackground("menubg.png");
}
@Override
@@ -11,7 +11,7 @@ public class SubGuiAnimationOptions extends SubGuiInterface {
public SubGuiAnimationOptions(Animation animation) {
this.animation = animation;
setBackground("smallbg.png");
setBackground("menubg.png");
}
@Override
@@ -11,7 +11,7 @@ public class SubGuiEditText extends SubGuiInterface {
public SubGuiEditText(String text) {
this.text = text;
setBackground("extrasmallbg.png");
setBackground("menubg.png");
closeOnEsc = true;
xSize = 176;
ySize = 71;
@@ -15,7 +15,7 @@ import org.lwjgl.opengl.GL11;
public class GuiQuestCompletion extends GuiNPCInterface implements ITopButtonListener {
private Quest quest;
private final ResourceLocation resource = new ResourceLocation("customnpcs", "textures/gui/smallbg.png");
private final ResourceLocation resource = new ResourceLocation("customnpcs", "textures/gui/menubg.png");
public GuiQuestCompletion(Quest quest) {
super();
@@ -20,7 +20,7 @@ import java.util.Vector;
public class GuiTransportSelection extends GuiNPCInterface implements ITopButtonListener, IScrollData {
private final ResourceLocation resource = new ResourceLocation("customnpcs", "textures/gui/smallbg.png");
private final ResourceLocation resource = new ResourceLocation("customnpcs", "textures/gui/menubg.png");
protected int xSize;
protected int guiLeft;
protected int guiTop;
@@ -16,7 +16,7 @@ import org.lwjgl.opengl.GL11;
import java.util.HashMap;
public class GuiScriptGlobal extends GuiNPCInterface implements IGuiData {
private final ResourceLocation resource = new ResourceLocation("customnpcs", "textures/gui/smallbg.png");
private final ResourceLocation resource = new ResourceLocation("customnpcs", "textures/gui/menubg.png");
private HashMap<Integer, Class<?>> scriptGuiClasses = new HashMap<>();
public GuiScriptGlobal() {
@@ -15,7 +15,7 @@ public class SubGuiNpcCooldownPicker extends SubGuiInterface implements ITextfie
public SubGuiNpcCooldownPicker(boolean isMCCustom, long currentCooldown) {
this.isMCCustom = isMCCustom;
this.cooldownValue = currentCooldown;
setBackground("smallbg.png");
setBackground("menubg.png");
xSize = 220;
ySize = 222;
closeOnEsc = true;