mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-25 19:14:30 +00:00
Proper Reformating
This commit is contained in:
1 parent
ce75880aba
commit
180d257024
1179 files changed
+59847
-61583
No files matched your search
@@ -8,24 +8,22 @@ import noppes.npcs.roles.JobFollower;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class GuiNpcFollowerJob extends GuiNPCInterface2 implements ICustomScrollListener
|
||||
{
|
||||
private JobFollower job;
|
||||
private GuiCustomScroll scroll;
|
||||
public GuiNpcFollowerJob(EntityNPCInterface npc)
|
||||
{
|
||||
super(npc);
|
||||
job = (JobFollower) npc.jobInterface;
|
||||
public class GuiNpcFollowerJob extends GuiNPCInterface2 implements ICustomScrollListener {
|
||||
private JobFollower job;
|
||||
private GuiCustomScroll scroll;
|
||||
|
||||
public GuiNpcFollowerJob(EntityNPCInterface npc) {
|
||||
super(npc);
|
||||
job = (JobFollower) npc.jobInterface;
|
||||
}
|
||||
|
||||
public void initGui()
|
||||
{
|
||||
super.initGui();
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
|
||||
addLabel(new GuiNpcLabel(1,"gui.name", guiLeft + 6, guiTop + 110));
|
||||
addTextField(new GuiNpcTextField(1,this, this.fontRendererObj, guiLeft + 50, guiTop + 105, 200, 20, job.name));
|
||||
addLabel(new GuiNpcLabel(1, "gui.name", guiLeft + 6, guiTop + 110));
|
||||
addTextField(new GuiNpcTextField(1, this, this.fontRendererObj, guiLeft + 50, guiTop + 105, 200, 20, job.name));
|
||||
|
||||
scroll = new GuiCustomScroll(this,0);
|
||||
scroll = new GuiCustomScroll(this, 0);
|
||||
scroll.setSize(143, 208);
|
||||
scroll.guiLeft = guiLeft + 268;
|
||||
scroll.guiTop = guiTop + 4;
|
||||
@@ -33,25 +31,25 @@ public class GuiNpcFollowerJob extends GuiNPCInterface2 implements ICustomScroll
|
||||
|
||||
List<String> names = new ArrayList<String>();
|
||||
List<EntityNPCInterface> list = npc.worldObj.getEntitiesWithinAABB(EntityNPCInterface.class, npc.boundingBox.expand(40, 40, 40));
|
||||
for(EntityNPCInterface npc : list){
|
||||
if(npc == this.npc || names.contains(npc.display.name))
|
||||
continue;
|
||||
names.add(npc.display.name);
|
||||
for (EntityNPCInterface npc : list) {
|
||||
if (npc == this.npc || names.contains(npc.display.name))
|
||||
continue;
|
||||
names.add(npc.display.name);
|
||||
}
|
||||
scroll.setList(names);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save() {
|
||||
job.name = getTextField(1).getText();
|
||||
public void save() {
|
||||
job.name = getTextField(1).getText();
|
||||
JobSavePacket.saveJob(job);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void customScrollClicked(int i, int j, int k,
|
||||
GuiCustomScroll guiCustomScroll) {
|
||||
getTextField(1).setText(guiCustomScroll.getSelected());
|
||||
}
|
||||
@Override
|
||||
public void customScrollClicked(int i, int j, int k,
|
||||
GuiCustomScroll guiCustomScroll) {
|
||||
getTextField(1).setText(guiCustomScroll.getSelected());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user