mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 12:39:05 +00:00
Merge branch 'packet' of https://github.com/KAMKEEL/CustomNPC-Plus into packet
This commit is contained in:
commit
b5d294dd20
8 files changed
+87
-22
No files matched your search
@@ -152,12 +152,12 @@ public class PacketHandlerPlayer{
|
||||
return;
|
||||
GuiDataPacket.sendGuiData(player, npc.roleInterface.writeToNBT(new NBTTagCompound()));
|
||||
}
|
||||
else if(type == EnumPlayerPacket.Transport){
|
||||
EntityNPCInterface npc = NoppesUtilServer.getEditingNpc(player);
|
||||
if(npc == null || npc.advanced.role != EnumRoleType.Transporter)
|
||||
return;
|
||||
NoppesUtilPlayer.transport(player, npc, ByteBufUtils.readString(buffer));
|
||||
}
|
||||
// else if(type == EnumPlayerPacket.Transport){
|
||||
// EntityNPCInterface npc = NoppesUtilServer.getEditingNpc(player);
|
||||
// if(npc == null || npc.advanced.role != EnumRoleType.Transporter)
|
||||
// return;
|
||||
// NoppesUtilPlayer.transport(player, npc, ByteBufUtils.readString(buffer));
|
||||
// }
|
||||
// else if(type == EnumPlayerPacket.BankUpgrade){
|
||||
// EntityNPCInterface npc = NoppesUtilServer.getEditingNpc(player);
|
||||
// if(npc == null || npc.advanced.role != EnumRoleType.Bank)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package noppes.npcs.client.gui.player;
|
||||
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.player.TransportPacket;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
@@ -18,9 +20,9 @@ public class GuiTransportSelection extends GuiNPCInterface implements ITopButton
|
||||
protected int xSize;
|
||||
protected int guiLeft;
|
||||
protected int guiTop;
|
||||
|
||||
|
||||
private GuiCustomScroll scroll;
|
||||
|
||||
|
||||
public GuiTransportSelection(EntityNPCInterface npc) {
|
||||
super(npc);
|
||||
xSize = 176;
|
||||
@@ -43,7 +45,7 @@ public class GuiTransportSelection extends GuiNPCInterface implements ITopButton
|
||||
scroll.guiTop = guiTop + 20;
|
||||
addScroll(scroll);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void drawScreen(int i, int j, float f)
|
||||
{
|
||||
@@ -61,7 +63,7 @@ public class GuiTransportSelection extends GuiNPCInterface implements ITopButton
|
||||
String sel = scroll.getSelected();
|
||||
if(button.id == 0 && sel != null){
|
||||
close();
|
||||
NoppesUtilPlayer.sendData(EnumPlayerPacket.Transport,sel);
|
||||
PacketClient.sendClient(new TransportPacket(sel));
|
||||
}
|
||||
}
|
||||
// @Override
|
||||
@@ -82,7 +84,7 @@ public class GuiTransportSelection extends GuiNPCInterface implements ITopButton
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void save() {
|
||||
}
|
||||
@@ -93,7 +95,7 @@ public class GuiTransportSelection extends GuiNPCInterface implements ITopButton
|
||||
@Override
|
||||
public void setSelected(String selected) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,7 +4,7 @@ public enum EnumPlayerPacket {
|
||||
// FollowerHire, // Finished
|
||||
// FollowerExtend,
|
||||
// FollowerState,
|
||||
Transport,
|
||||
// Transport,
|
||||
// BankUnlock,
|
||||
// BankUpgrade,
|
||||
Dialog,
|
||||
|
||||
Reference in new issue
Block a user