Proper Reformating

This commit is contained in:
Kam committed 2025-03-13 17:14:45 -04:00
1 parent ce75880aba
commit 180d257024
1179 files changed
+59847 -61583

No files matched your search

@@ -62,16 +62,16 @@ public class GuiScriptLinkedItem extends GuiNPCInterface implements GuiYesNoCall
}
public void initGui() {
this.ySize = (int)((double)this.xSize * 0.56);
if ((double)this.ySize > (double)this.height * 0.95) {
this.ySize = (int)((double)this.height * 0.95);
this.xSize = (int)((double)this.ySize / 0.56);
this.ySize = (int) ((double) this.xSize * 0.56);
if ((double) this.ySize > (double) this.height * 0.95) {
this.ySize = (int) ((double) this.height * 0.95);
this.xSize = (int) ((double) this.ySize / 0.56);
}
this.bgScale = (float)this.xSize / 400.0F;
this.bgScale = (float) this.xSize / 400.0F;
super.initGui();
this.guiTop += 10;
int yoffset = (int)((double)this.ySize * 0.02);
int yoffset = (int) ((double) this.ySize * 0.02);
GuiMenuTopButton top;
this.addTopButton(top = new GuiMenuTopButton(0, this.guiLeft + 4, this.guiTop - 17, "gui.settings"));
int topXoffset = 0;
@@ -105,7 +105,7 @@ public class GuiScriptLinkedItem extends GuiNPCInterface implements GuiYesNoCall
hookLabel.color = 11184810;
this.addLabel(hookLabel);
ScriptContainer container = this.scriptHandler.container;
GuiScriptTextArea ta = new GuiScriptTextArea(this, 2, this.guiLeft + 1 + yoffset, this.guiTop + yoffset, this.xSize - 108 - yoffset, (int)((double)this.ySize * 0.96) - yoffset * 2, container == null ? "" : container.script);
GuiScriptTextArea ta = new GuiScriptTextArea(this, 2, this.guiLeft + 1 + yoffset, this.guiTop + yoffset, this.xSize - 108 - yoffset, (int) ((double) this.ySize * 0.96) - yoffset * 2, container == null ? "" : container.script);
ta.enableCodeHighlighting();
ta.setListener(this);
this.addTextField(ta);
@@ -119,7 +119,7 @@ public class GuiScriptLinkedItem extends GuiNPCInterface implements GuiYesNoCall
this.getButton(107).enabled = false;
GuiCustomScroll scroll = (new GuiCustomScroll(this, 0)).setUnselectable();
scroll.setSize(100, (int)((double)this.ySize * 0.54) - yoffset * 2);
scroll.setSize(100, (int) ((double) this.ySize * 0.54) - yoffset * 2);
scroll.guiLeft = left1;
scroll.guiTop = this.guiTop + 88 + yoffset;
if (container != null) {
@@ -128,7 +128,7 @@ public class GuiScriptLinkedItem extends GuiNPCInterface implements GuiYesNoCall
this.addScroll(scroll);
} else {
GuiNpcTextArea var8 = new GuiNpcTextArea(2, this, this.guiLeft + 4 + yoffset, this.guiTop + 6 + yoffset, this.xSize - 160 - yoffset, (int)((float)this.ySize * 0.92F) - yoffset * 2, this.getConsoleText());
GuiNpcTextArea var8 = new GuiNpcTextArea(2, this, this.guiLeft + 4 + yoffset, this.guiTop + 6 + yoffset, this.xSize - 160 - yoffset, (int) ((float) this.ySize * 0.92F) - yoffset * 2, this.getConsoleText());
var8.enabled = false;
this.addTextField(var8);
int var9 = this.guiLeft + this.xSize - 150;
@@ -175,9 +175,9 @@ public class GuiScriptLinkedItem extends GuiNPCInterface implements GuiYesNoCall
StringBuilder builder = new StringBuilder();
Iterator var3 = map.entrySet().iterator();
while(var3.hasNext()) {
Map.Entry<Long, String> entry = (Map.Entry)var3.next();
builder.insert(0, new Date((Long)entry.getKey()) + (String)entry.getValue() + "\n");
while (var3.hasNext()) {
Map.Entry<Long, String> entry = (Map.Entry) var3.next();
builder.insert(0, new Date((Long) entry.getKey()) + (String) entry.getValue() + "\n");
}
return builder.toString();
@@ -186,8 +186,8 @@ public class GuiScriptLinkedItem extends GuiNPCInterface implements GuiYesNoCall
private int getScriptIndex() {
int i = 0;
for(Iterator var2 = this.languages.keySet().iterator(); var2.hasNext(); ++i) {
String language = (String)var2.next();
for (Iterator var2 = this.languages.keySet().iterator(); var2.hasNext(); ++i) {
String language = (String) var2.next();
if (language.equalsIgnoreCase(this.scriptHandler.getLanguage())) {
return i;
}
@@ -291,11 +291,11 @@ public class GuiScriptLinkedItem extends GuiNPCInterface implements GuiYesNoCall
}
if (guibutton.id == 104) {
this.scriptHandler.setEnabled(((GuiNpcButton)guibutton).getValue() == 1);
this.scriptHandler.setEnabled(((GuiNpcButton) guibutton).getValue() == 1);
}
if (guibutton.id == 105) {
container1 = new GuiYesNo(this, "", ((GuiNpcButton)guibutton).displayString, 10);
container1 = new GuiYesNo(this, "", ((GuiNpcButton) guibutton).displayString, 10);
this.displayGuiScreen(container1);
}
@@ -346,12 +346,12 @@ public class GuiScriptLinkedItem extends GuiNPCInterface implements GuiYesNoCall
NBTTagList data = compound.getTagList("Languages", 10);
HashMap languages = new HashMap();
for(int i = 0; i < data.tagCount(); ++i) {
for (int i = 0; i < data.tagCount(); ++i) {
NBTTagCompound comp = data.getCompoundTagAt(i);
ArrayList scripts = new ArrayList();
NBTTagList list = comp.getTagList("Scripts", 8);
for(int j = 0; j < list.tagCount(); ++j) {
for (int j = 0; j < list.tagCount(); ++j) {
scripts.add(list.getStringTagAt(j));
}