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

@@ -11,34 +11,33 @@ import noppes.npcs.controllers.data.SpawnData;
import java.util.ArrayList;
import java.util.List;
public class SubGuiNpcBiomes extends SubGuiInterface
{
private SpawnData data;
private GuiCustomScroll scroll1;
private GuiCustomScroll scroll2;
public class SubGuiNpcBiomes extends SubGuiInterface {
private SpawnData data;
private GuiCustomScroll scroll1;
private GuiCustomScroll scroll2;
public SubGuiNpcBiomes(SpawnData data){
this.data = data;
setBackground("menubg.png");
xSize = 346;
ySize = 216;
closeOnEsc = true;
public SubGuiNpcBiomes(SpawnData data) {
this.data = data;
setBackground("menubg.png");
xSize = 346;
ySize = 216;
closeOnEsc = true;
}
public void initGui(){
public void initGui() {
super.initGui();
if(scroll1 == null){
scroll1 = new GuiCustomScroll(this,0);
scroll1.setSize(140, 180);
if (scroll1 == null) {
scroll1 = new GuiCustomScroll(this, 0);
scroll1.setSize(140, 180);
}
scroll1.guiLeft = guiLeft + 4;
scroll1.guiTop = guiTop + 14;
this.addScroll(scroll1);
addLabel(new GuiNpcLabel(1, "spawning.availableBiomes", guiLeft + 4, guiTop + 4));
if(scroll2 == null){
scroll2 = new GuiCustomScroll(this,1);
scroll2.setSize(140, 180);
if (scroll2 == null) {
scroll2 = new GuiCustomScroll(this, 1);
scroll2.setSize(140, 180);
}
scroll2.guiLeft = guiLeft + 200;
scroll2.guiTop = guiTop + 14;
@@ -48,58 +47,58 @@ public class SubGuiNpcBiomes extends SubGuiInterface
List<String> biomes = new ArrayList<String>();
for (BiomeGenBase base : BiomeGenBase.getBiomeGenArray()) {
if (base != null && base.biomeName != null && !data.biomes.contains(base.biomeName)) {
biomes.add(base.biomeName);
biomes.add(base.biomeName);
}
}
scroll1.setList(biomes);
scroll2.setList(data.biomes);
addButton(new GuiNpcButton(1, guiLeft + 145, guiTop + 40, 55, 20, ">"));
addButton(new GuiNpcButton(2, guiLeft + 145, guiTop + 62, 55, 20, "<"));
addButton(new GuiNpcButton(1, guiLeft + 145, guiTop + 40, 55, 20, ">"));
addButton(new GuiNpcButton(2, guiLeft + 145, guiTop + 62, 55, 20, "<"));
addButton(new GuiNpcButton(3, guiLeft + 145, guiTop + 90, 55, 20, ">>"));
addButton(new GuiNpcButton(4, guiLeft + 145, guiTop + 112, 55, 20, "<<"));
addButton(new GuiNpcButton(3, guiLeft + 145, guiTop + 90, 55, 20, ">>"));
addButton(new GuiNpcButton(4, guiLeft + 145, guiTop + 112, 55, 20, "<<"));
addButton(new GuiNpcButton(66, guiLeft + 260, guiTop + 194, 60, 20, "gui.done"));
addButton(new GuiNpcButton(66, guiLeft + 260, guiTop + 194, 60, 20, "gui.done"));
}
protected void actionPerformed(GuiButton guibutton){
GuiNpcButton button = (GuiNpcButton) guibutton;
if(button.id == 1){
if(scroll1.hasSelected()){
data.biomes.add(scroll1.getSelected());
scroll1.selected = -1;
scroll1.selected = -1;
initGui();
}
}
if(button.id == 2){
if(scroll2.hasSelected()){
data.biomes.remove(scroll2.getSelected());
scroll2.selected = -1;
initGui();
}
}
if(button.id == 3){
data.biomes.clear();
for (BiomeGenBase base : BiomeGenBase.getBiomeGenArray()) {
if (base != null) {
data.biomes.add(base.biomeName);
}
}
scroll1.selected = -1;
scroll2.selected = -1;
initGui();
}
if(button.id == 4){
data.biomes.clear();
scroll1.selected = -1;
scroll2.selected = -1;
initGui();
}
if(button.id == 66){
close();
protected void actionPerformed(GuiButton guibutton) {
GuiNpcButton button = (GuiNpcButton) guibutton;
if (button.id == 1) {
if (scroll1.hasSelected()) {
data.biomes.add(scroll1.getSelected());
scroll1.selected = -1;
scroll1.selected = -1;
initGui();
}
}
if (button.id == 2) {
if (scroll2.hasSelected()) {
data.biomes.remove(scroll2.getSelected());
scroll2.selected = -1;
initGui();
}
}
if (button.id == 3) {
data.biomes.clear();
for (BiomeGenBase base : BiomeGenBase.getBiomeGenArray()) {
if (base != null) {
data.biomes.add(base.biomeName);
}
}
scroll1.selected = -1;
scroll2.selected = -1;
initGui();
}
if (button.id == 4) {
data.biomes.clear();
scroll1.selected = -1;
scroll2.selected = -1;
initGui();
}
if (button.id == 66) {
close();
}
}