MarkData to NPCs [1.12 Backport]

This commit is contained in:
Kam committed 2024-02-21 03:02:39 -05:00
1 parent 7f2a375323
commit 8ec795c98a
22 files changed
+473 -17

No files matched your search

@@ -45,7 +45,9 @@ public class GuiNpcAdvanced extends GuiNPCInterface2 implements IGuiData
this.addButton(new GuiNpcButton(12, guiLeft + 85, y += gap, 214, 20, "advanced.night"));
this.addButton(new GuiNpcButton(13, guiLeft + 85, y += gap, 214, 20, "global.linked"));
this.addButton(new GuiNpcButton(14, guiLeft + 85, y += gap, 214, 20, "menu.tags"));
// FIX THIS KAM
this.addButton(new GuiNpcButton(15, guiLeft + 208, y, 190, 20, "advanced.marks"));
}
@Override
@@ -68,7 +70,7 @@ public class GuiNpcAdvanced extends GuiNPCInterface2 implements IGuiData
if(button.id == 5){
hasChanges = true;
npc.advanced.setJob(button.getValue());
getButton(4).setEnabled(npc.advanced.job != EnumJobType.None && npc.advanced.job != EnumJobType.ChunkLoader);
}
if(button.id == 9){
@@ -99,6 +101,10 @@ public class GuiNpcAdvanced extends GuiNPCInterface2 implements IGuiData
save();
NoppesUtil.openGUI(player, new GuiNPCTagSetup(npc));
}
if(button.id == 15){
save();
NoppesUtil.openGUI(player, new GuiNPCMarks(npc));
}
}
@Override
@@ -106,7 +112,7 @@ public class GuiNpcAdvanced extends GuiNPCInterface2 implements IGuiData
if(compound.hasKey("RoleData")){
if(npc.roleInterface != null)
npc.roleInterface.readFromNBT(compound);
if(npc.advanced.role == EnumRoleType.Trader)
NoppesUtil.requestOpenGUI(EnumGuiType.SetupTrader);
else if(npc.advanced.role == EnumRoleType.Follower)
@@ -121,7 +127,7 @@ public class GuiNpcAdvanced extends GuiNPCInterface2 implements IGuiData
else if(compound.hasKey("JobData")){
if(npc.jobInterface != null)
npc.jobInterface.readFromNBT(compound);
if(npc.advanced.job == EnumJobType.Bard)
NoppesUtil.openGUI(player, new GuiNpcBard(npc));
else if(npc.advanced.job == EnumJobType.Healer)
@@ -142,7 +148,7 @@ public class GuiNpcAdvanced extends GuiNPCInterface2 implements IGuiData
initGui();
}
}
@Override
public void save() {
if(hasChanges){
@@ -150,6 +156,6 @@ public class GuiNpcAdvanced extends GuiNPCInterface2 implements IGuiData
hasChanges = false;
}
}
}