mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-22 13:10:04 +00:00
Large Packet Commit
This commit is contained in:
1 parent
b15d64bd09
commit
f2c34699b1
41 files changed
+446
-432
No files matched your search
@@ -1,5 +1,7 @@
|
||||
package noppes.npcs.client.gui;
|
||||
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.request.npc.RemoteDeletePacket;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import noppes.npcs.client.Client;
|
||||
@@ -11,7 +13,7 @@ import java.util.HashMap;
|
||||
import java.util.Vector;
|
||||
|
||||
public class GuiNpcDimension extends GuiNPCInterface implements IScrollData{
|
||||
|
||||
|
||||
private GuiCustomScroll scroll;
|
||||
private HashMap<String, Integer> data = new HashMap<String, Integer>();
|
||||
public GuiNpcDimension() {
|
||||
@@ -30,10 +32,10 @@ public class GuiNpcDimension extends GuiNPCInterface implements IScrollData{
|
||||
scroll.guiLeft = guiLeft + 4;
|
||||
scroll.guiTop = guiTop + 4;
|
||||
addScroll(scroll);
|
||||
|
||||
|
||||
String title = StatCollector.translateToLocal("Dimensions");
|
||||
int x = (xSize - this.fontRendererObj.getStringWidth(title)) / 2;
|
||||
|
||||
|
||||
this.addLabel(new GuiNpcLabel(0, title, guiLeft + x, guiTop - 8));
|
||||
|
||||
this.addButton(new GuiNpcButton(4, guiLeft + 170, guiTop + 72,82,20, "remote.tp"));
|
||||
@@ -43,23 +45,23 @@ public class GuiNpcDimension extends GuiNPCInterface implements IScrollData{
|
||||
public void confirmClicked(boolean flag, int i)
|
||||
{
|
||||
if(flag){
|
||||
Client.sendData(EnumPacketServer.RemoteDelete,data.get(scroll.getSelected()));
|
||||
PacketClient.sendClient(new RemoteDeletePacket(data.get(scroll.getSelected())));
|
||||
}
|
||||
NoppesUtil.openGUI(player, this);
|
||||
}
|
||||
protected void actionPerformed(GuiButton guibutton)
|
||||
{
|
||||
int id = guibutton.id;
|
||||
|
||||
|
||||
if(!data.containsKey(scroll.getSelected()))
|
||||
return;
|
||||
|
||||
|
||||
if(id == 4){
|
||||
Client.sendData(EnumPacketServer.DimensionTeleport, data.get(scroll.getSelected()));
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void mouseClicked(int i, int j, int k)
|
||||
{
|
||||
@@ -77,7 +79,7 @@ public class GuiNpcDimension extends GuiNPCInterface implements IScrollData{
|
||||
@Override
|
||||
public void save() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
public void setData(Vector<String> list, HashMap<String, Integer> data) {
|
||||
|
||||
Reference in new issue
Block a user