Limited config NpcNavRange to 96. Added darken screen option to dialogs.

This commit is contained in:
luisc committed 2022-01-14 17:37:09 -06:00
1 parent 6a6548845b
commit 4f38edc147
4 files changed
+13 -1

No files matched your search

+5 -1
View File
@@ -69,7 +69,7 @@ public class CustomNpcs {
private static int NewEntityStartId = 0;
@ConfigProp(info = "Navigation search range for NPCs. Not recommended to increase if you have a slow pc or on a server")
@ConfigProp(info = "Navigation search range for NPCs. Not recommended to increase if you have a slow pc or on a server. Minimum of 16, maximum of 96.")
public static int NpcNavRange = 32;
@ConfigProp(info = "Set to true if you want the dialog command option to be able to use op commands like tp etc")
@@ -167,6 +167,10 @@ public class CustomNpcs {
if (NpcNavRange < 16) {
NpcNavRange = 16;
}
if (NpcNavRange > 96) {
NpcNavRange = 96;
}
EnchantInterface.load();
CustomItems.load();
@@ -55,6 +55,9 @@ public class SubGuiNpcDialogExtra extends SubGuiInterface implements ISubGuiList
addButton(new GuiNpcButtonYesNo(15, guiLeft + 120, y += 22, dialog.disableEsc));
addLabel(new GuiNpcLabel(15, "dialog.disableEsc", guiLeft + 4, y + 5));
addButton(new GuiNpcButtonYesNo(16, guiLeft + 120, y += 22, dialog.darkenScreen));
addLabel(new GuiNpcLabel(16, "Darken Screen", guiLeft + 4, y + 5));
this.addButton(new GuiNpcButton(66, guiLeft + 82, guiTop + 192,98, 20, "gui.done"));
@@ -76,6 +79,9 @@ public class SubGuiNpcDialogExtra extends SubGuiInterface implements ISubGuiList
if(button.id == 15){
dialog.disableEsc = button.getValue() == 1;
}
if(button.id == 15){
dialog.darkenScreen = button.getValue() == 1;
}
if(button.id == 13){
setSubGui(new SubGuiMailmanSendSetup(dialog.mail, getParent()));
}
@@ -64,6 +64,7 @@ public class GuiDialogInteract extends GuiNPCInterface implements IGuiClose
grabMouse(dialog.showWheel);
guiTop = (height - ySize);
calculateRowHeight();
this.drawDefaultBackground = dialog.darkenScreen;
}
public void grabMouse(boolean grab){
@@ -30,6 +30,7 @@ public class Dialog implements ICompatibilty, IDialog {
public boolean hideNPC = false;
public boolean showWheel = false;
public boolean disableEsc = false;
public boolean darkenScreen = true;
public boolean hasDialogs(EntityPlayer player) {
for(DialogOption option: options.values())