mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-21 06:52:21 +00:00
Proper Reformating
This commit is contained in:
1 parent
ce75880aba
commit
180d257024
1179 files changed
+59847
-61583
No files matched your search
@@ -11,43 +11,45 @@ import noppes.npcs.client.gui.util.GuiNpcLabel;
|
||||
import noppes.npcs.client.gui.util.GuiNpcTextField;
|
||||
|
||||
|
||||
public class GuiNpcWaypoint extends GuiNPCInterface{
|
||||
public class GuiNpcWaypoint extends GuiNPCInterface {
|
||||
|
||||
private TileWaypoint tile;
|
||||
private TileWaypoint tile;
|
||||
|
||||
public GuiNpcWaypoint(int x, int y, int z) {
|
||||
super();
|
||||
tile = (TileWaypoint) player.worldObj.getTileEntity(x, y, z);
|
||||
xSize = 265;
|
||||
}
|
||||
public void initGui()
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
|
||||
addLabel(new GuiNpcLabel(0,"gui.name", guiLeft+ 1, guiTop + 76, 0xffffff));
|
||||
addTextField(new GuiNpcTextField(0, this, fontRendererObj, guiLeft+ 60, guiTop + 71,200,20, tile.name));
|
||||
|
||||
addLabel(new GuiNpcLabel(1,"gui.range", guiLeft+ 1, guiTop + 97, 0xffffff));
|
||||
addTextField(new GuiNpcTextField(1, this, fontRendererObj, guiLeft+ 60, guiTop + 92,200,20, tile.range + ""));
|
||||
getTextField(1).integersOnly = true;
|
||||
getTextField(1).setMinMaxDefault(2, 60, 10);
|
||||
|
||||
addButton(new GuiNpcButton(0, guiLeft + 40, guiTop + 190,120,20, "Done"));
|
||||
super();
|
||||
tile = (TileWaypoint) player.worldObj.getTileEntity(x, y, z);
|
||||
xSize = 265;
|
||||
}
|
||||
protected void actionPerformed(GuiButton guibutton) {
|
||||
int id = guibutton.id;
|
||||
if(id == 0)
|
||||
close();
|
||||
}
|
||||
@Override
|
||||
public void save() {
|
||||
tile.name = getTextField(0).getText();
|
||||
tile.range = getTextField(1).getInteger();
|
||||
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
tile.writeToNBT(compound);
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
|
||||
|
||||
addLabel(new GuiNpcLabel(0, "gui.name", guiLeft + 1, guiTop + 76, 0xffffff));
|
||||
addTextField(new GuiNpcTextField(0, this, fontRendererObj, guiLeft + 60, guiTop + 71, 200, 20, tile.name));
|
||||
|
||||
addLabel(new GuiNpcLabel(1, "gui.range", guiLeft + 1, guiTop + 97, 0xffffff));
|
||||
addTextField(new GuiNpcTextField(1, this, fontRendererObj, guiLeft + 60, guiTop + 92, 200, 20, tile.range + ""));
|
||||
getTextField(1).integersOnly = true;
|
||||
getTextField(1).setMinMaxDefault(2, 60, 10);
|
||||
|
||||
addButton(new GuiNpcButton(0, guiLeft + 40, guiTop + 190, 120, 20, "Done"));
|
||||
}
|
||||
|
||||
protected void actionPerformed(GuiButton guibutton) {
|
||||
int id = guibutton.id;
|
||||
if (id == 0)
|
||||
close();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save() {
|
||||
tile.name = getTextField(0).getText();
|
||||
tile.range = getTextField(1).getInteger();
|
||||
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
tile.writeToNBT(compound);
|
||||
PacketClient.sendClient(new TileEntitySavePacket(compound));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user