mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 04:05:12 +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
@@ -8,16 +8,31 @@ import cpw.mods.fml.common.network.internal.FMLProxyPacket;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import kamkeel.npcs.network.enums.EnumChannelType;
|
||||
import kamkeel.npcs.network.enums.EnumRequestPacket;
|
||||
import kamkeel.npcs.network.packets.data.*;
|
||||
import kamkeel.npcs.network.packets.data.gui.*;
|
||||
import kamkeel.npcs.network.packets.data.large.*;
|
||||
import kamkeel.npcs.network.packets.data.npc.*;
|
||||
import kamkeel.npcs.network.packets.data.script.*;
|
||||
import kamkeel.npcs.network.packets.request.GuiRequestPacket;
|
||||
import kamkeel.npcs.network.packets.request.bank.BankGetPacket;
|
||||
import kamkeel.npcs.network.packets.request.bank.BankRemovePacket;
|
||||
import kamkeel.npcs.network.packets.request.bank.BankSavePacket;
|
||||
import kamkeel.npcs.network.packets.request.bank.BanksGetPacket;
|
||||
import kamkeel.npcs.network.packets.request.dialog.*;
|
||||
import kamkeel.npcs.network.packets.request.linked.LinkedAddPacket;
|
||||
import kamkeel.npcs.network.packets.request.linked.LinkedGetAllPacket;
|
||||
import kamkeel.npcs.network.packets.request.linked.LinkedRemovePacket;
|
||||
import kamkeel.npcs.network.packets.request.linked.LinkedSetPacket;
|
||||
import kamkeel.npcs.network.packets.request.naturalspawns.NaturalSpawnGetAllPacket;
|
||||
import kamkeel.npcs.network.packets.request.naturalspawns.NaturalSpawnGetPacket;
|
||||
import kamkeel.npcs.network.packets.request.naturalspawns.NaturalSpawnRemovePacket;
|
||||
import kamkeel.npcs.network.packets.request.naturalspawns.NaturalSpawnSavePacket;
|
||||
import kamkeel.npcs.network.packets.request.npc.*;
|
||||
import kamkeel.npcs.network.packets.request.quest.*;
|
||||
import kamkeel.npcs.network.packets.request.recipe.RecipeGetPacket;
|
||||
import kamkeel.npcs.network.packets.request.recipe.RecipeRemovePacket;
|
||||
import kamkeel.npcs.network.packets.request.recipe.RecipeSavePacket;
|
||||
import kamkeel.npcs.network.packets.request.recipe.RecipesGetPacket;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
@@ -56,6 +71,7 @@ public class PacketHandler {
|
||||
|
||||
this.registerChannels();
|
||||
this.registerDataPackets();
|
||||
this.registerRequestPackets();
|
||||
}
|
||||
|
||||
public void registerRequestPackets(){
|
||||
@@ -64,6 +80,64 @@ public class PacketHandler {
|
||||
REQUEST_PACKET.registerPacket(new LinkedRemovePacket());
|
||||
REQUEST_PACKET.registerPacket(new LinkedSetPacket());
|
||||
REQUEST_PACKET.registerPacket(new LinkedAddPacket());
|
||||
|
||||
// Bank Packets
|
||||
REQUEST_PACKET.registerPacket(new BanksGetPacket());
|
||||
REQUEST_PACKET.registerPacket(new BankGetPacket());
|
||||
REQUEST_PACKET.registerPacket(new BankRemovePacket());
|
||||
REQUEST_PACKET.registerPacket(new BankSavePacket());
|
||||
|
||||
// Recipe Packets
|
||||
REQUEST_PACKET.registerPacket(new RecipesGetPacket());
|
||||
REQUEST_PACKET.registerPacket(new RecipeGetPacket());
|
||||
REQUEST_PACKET.registerPacket(new RecipeRemovePacket());
|
||||
REQUEST_PACKET.registerPacket(new RecipeSavePacket());
|
||||
|
||||
// Natural Spawn Packets
|
||||
REQUEST_PACKET.registerPacket(new NaturalSpawnGetAllPacket());
|
||||
REQUEST_PACKET.registerPacket(new NaturalSpawnGetPacket());
|
||||
REQUEST_PACKET.registerPacket(new NaturalSpawnSavePacket());
|
||||
REQUEST_PACKET.registerPacket(new NaturalSpawnRemovePacket());
|
||||
|
||||
// Dialog Category Packets
|
||||
REQUEST_PACKET.registerPacket(new DialogCategorySavePacket());
|
||||
REQUEST_PACKET.registerPacket(new DialogCategoryRemovePacket());
|
||||
REQUEST_PACKET.registerPacket(new DialogCategoryGetPacket());
|
||||
|
||||
// Dialog Packets
|
||||
REQUEST_PACKET.registerPacket(new DialogSavePacket());
|
||||
REQUEST_PACKET.registerPacket(new DialogRemovePacket());
|
||||
|
||||
REQUEST_PACKET.registerPacket(new DialogNpcGetPacket());
|
||||
REQUEST_PACKET.registerPacket(new DialogNpcSetPacket());
|
||||
REQUEST_PACKET.registerPacket(new DialogNpcRemovePacket());
|
||||
|
||||
// Quest Category Packets
|
||||
REQUEST_PACKET.registerPacket(new QuestCategorySavePacket());
|
||||
REQUEST_PACKET.registerPacket(new QuestCategoryRemovePacket());
|
||||
REQUEST_PACKET.registerPacket(new QuestCategoryGetPacket());
|
||||
|
||||
// Quest Packets
|
||||
REQUEST_PACKET.registerPacket(new QuestSavePacket());
|
||||
REQUEST_PACKET.registerPacket(new QuestRemovePacket());
|
||||
REQUEST_PACKET.registerPacket(new QuestDialogGetTitlePacket());
|
||||
|
||||
// Remote Packets
|
||||
REQUEST_PACKET.registerPacket(new RemoteMainMenuPacket());
|
||||
REQUEST_PACKET.registerPacket(new RemoteGlobalMenuPacket());
|
||||
REQUEST_PACKET.registerPacket(new RemoteDeletePacket());
|
||||
REQUEST_PACKET.registerPacket(new RemoteNpcsGetPacket());
|
||||
REQUEST_PACKET.registerPacket(new RemoteFreezeGetPacket());
|
||||
REQUEST_PACKET.registerPacket(new RemoteFreezePacket());
|
||||
REQUEST_PACKET.registerPacket(new RemoteResetPacket());
|
||||
REQUEST_PACKET.registerPacket(new RemoteTpToNpcPacket());
|
||||
|
||||
|
||||
|
||||
//
|
||||
|
||||
// Other
|
||||
REQUEST_PACKET.registerPacket(new GuiRequestPacket());
|
||||
}
|
||||
|
||||
public void registerDataPackets(){
|
||||
|
||||
+3
-4
@@ -16,20 +16,19 @@ import noppes.npcs.constants.EnumGuiType;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public final class GuiPacket extends AbstractPacket {
|
||||
public final class GuiRequestPacket extends AbstractPacket {
|
||||
public static String packetName = "Request|Gui";
|
||||
|
||||
private int guiIndex, posX, posY, posZ;
|
||||
|
||||
public GuiPacket(int guiIndex, int posX, int posY, int posZ) {
|
||||
public GuiRequestPacket(int guiIndex, int posX, int posY, int posZ) {
|
||||
this.guiIndex = guiIndex;
|
||||
this.posX = posX;
|
||||
this.posY = posY;
|
||||
this.posZ = posZ;
|
||||
}
|
||||
|
||||
public GuiPacket() {
|
||||
}
|
||||
public GuiRequestPacket() {}
|
||||
|
||||
@Override
|
||||
public Enum getType() {
|
||||
@@ -27,8 +27,7 @@ public final class BankRemovePacket extends AbstractPacket {
|
||||
this.bankId = bankId;
|
||||
}
|
||||
|
||||
public BankRemovePacket() {
|
||||
}
|
||||
public BankRemovePacket() {}
|
||||
|
||||
@Override
|
||||
public Enum getType() {
|
||||
|
||||
+7
-2
@@ -21,7 +21,12 @@ import java.io.IOException;
|
||||
public final class DialogCategoryGetPacket extends AbstractPacket {
|
||||
public static String packetName = "Request|DialogCategoryGet";
|
||||
|
||||
public DialogCategoryGetPacket() {
|
||||
private int categoryID;
|
||||
|
||||
public DialogCategoryGetPacket() {}
|
||||
|
||||
public DialogCategoryGetPacket(int categoryID) {
|
||||
this.categoryID = categoryID;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -34,10 +39,10 @@ public final class DialogCategoryGetPacket extends AbstractPacket {
|
||||
return PacketHandler.REQUEST_PACKET;
|
||||
}
|
||||
|
||||
// No permission override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void sendData(ByteBuf out) throws IOException {
|
||||
out.writeInt(this.categoryID);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+5
-2
@@ -52,8 +52,11 @@ public final class DialogCategoryRemovePacket extends AbstractPacket {
|
||||
|
||||
@Override
|
||||
public void receiveData(ByteBuf in, EntityPlayer player) throws IOException {
|
||||
if (!(player instanceof EntityPlayerMP)) return;
|
||||
if (!PacketUtil.verifyItemPacket(EnumItemPacketType.WAND, player)) return;
|
||||
if (!(player instanceof EntityPlayerMP))
|
||||
return;
|
||||
|
||||
if (!PacketUtil.verifyItemPacket(EnumItemPacketType.WAND, player))
|
||||
return;
|
||||
int id = in.readInt();
|
||||
DialogController.Instance.removeCategory(id);
|
||||
ScrollDataPacket.sendScrollData((EntityPlayerMP) player, DialogController.Instance.getScroll());
|
||||
|
||||
@@ -18,8 +18,7 @@ import java.io.IOException;
|
||||
public final class DialogNpcGetPacket extends AbstractPacket {
|
||||
public static String packetName = "Request|DialogNpcGet";
|
||||
|
||||
public DialogNpcGetPacket() {
|
||||
}
|
||||
public DialogNpcGetPacket() {}
|
||||
|
||||
@Override
|
||||
public Enum getType() {
|
||||
@@ -31,17 +30,18 @@ public final class DialogNpcGetPacket extends AbstractPacket {
|
||||
return PacketHandler.REQUEST_PACKET;
|
||||
}
|
||||
|
||||
// No permission override
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@Override
|
||||
public void sendData(ByteBuf out) throws IOException {
|
||||
}
|
||||
public void sendData(ByteBuf out) throws IOException {}
|
||||
|
||||
@Override
|
||||
public void receiveData(ByteBuf in, EntityPlayer player) throws IOException {
|
||||
if (!(player instanceof EntityPlayerMP)) return;
|
||||
if (!PacketUtil.verifyItemPacket(EnumItemPacketType.WAND, player)) return;
|
||||
if (!(player instanceof EntityPlayerMP))
|
||||
return;
|
||||
|
||||
if (!PacketUtil.verifyItemPacket(EnumItemPacketType.WAND, player))
|
||||
return;
|
||||
|
||||
NoppesUtilServer.sendNpcDialogs(player);
|
||||
}
|
||||
}
|
||||
+7
-4
@@ -24,8 +24,7 @@ public final class DialogNpcRemovePacket extends AbstractPacket {
|
||||
this.index = index;
|
||||
}
|
||||
|
||||
public DialogNpcRemovePacket() {
|
||||
}
|
||||
public DialogNpcRemovePacket() {}
|
||||
|
||||
@Override
|
||||
public Enum getType() {
|
||||
@@ -55,8 +54,12 @@ public final class DialogNpcRemovePacket extends AbstractPacket {
|
||||
|
||||
@Override
|
||||
public void receiveData(ByteBuf in, EntityPlayer player) throws IOException {
|
||||
if (!(player instanceof EntityPlayerMP)) return;
|
||||
if (!PacketUtil.verifyItemPacket(EnumItemPacketType.WAND, player)) return;
|
||||
if (!(player instanceof EntityPlayerMP))
|
||||
return;
|
||||
|
||||
if (!PacketUtil.verifyItemPacket(EnumItemPacketType.WAND, player))
|
||||
return;
|
||||
|
||||
int idx = in.readInt();
|
||||
npc.dialogs.remove(idx);
|
||||
}
|
||||
|
||||
@@ -56,17 +56,20 @@ public final class DialogRemovePacket extends AbstractPacket {
|
||||
|
||||
@Override
|
||||
public void receiveData(ByteBuf in, EntityPlayer player) throws IOException {
|
||||
if (!(player instanceof EntityPlayerMP)) return;
|
||||
if (!PacketUtil.verifyItemPacket(EnumItemPacketType.WAND, player)) return;
|
||||
int id = in.readInt();
|
||||
if (!(player instanceof EntityPlayerMP))
|
||||
return;
|
||||
if (!PacketUtil.verifyItemPacket(EnumItemPacketType.WAND, player))
|
||||
return;
|
||||
int diagId = in.readInt();
|
||||
boolean sendGroup = in.readBoolean();
|
||||
Dialog dialog = DialogController.Instance.dialogs.get(id);
|
||||
if (dialog != null && dialog.category != null) {
|
||||
Dialog dialog = DialogController.Instance.dialogs.get(diagId);
|
||||
if(dialog != null && dialog.category != null){
|
||||
DialogController.Instance.removeDialog(dialog);
|
||||
if (sendGroup) {
|
||||
NoppesUtilServer.sendDialogGroup((EntityPlayerMP) player, dialog.category);
|
||||
} else {
|
||||
NoppesUtilServer.sendDialogData((EntityPlayerMP) player, dialog.category);
|
||||
if(sendGroup){
|
||||
NoppesUtilServer.sendDialogGroup((EntityPlayerMP) player,dialog.category);
|
||||
}
|
||||
else {
|
||||
NoppesUtilServer.sendDialogData((EntityPlayerMP) player,dialog.category);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,6 +60,7 @@ public final class LinkedSetPacket extends AbstractPacket {
|
||||
return;
|
||||
if (!PacketUtil.verifyItemPacket(EnumItemPacketType.WAND, player))
|
||||
return;
|
||||
|
||||
npc.linkedName = ByteBufUtils.readString(in);
|
||||
LinkedNpcController.Instance.loadNpcData(npc);
|
||||
}
|
||||
|
||||
+1
-2
@@ -27,8 +27,7 @@ public final class NaturalSpawnGetPacket extends AbstractPacket {
|
||||
this.spawnId = spawnId;
|
||||
}
|
||||
|
||||
public NaturalSpawnGetPacket() {
|
||||
}
|
||||
public NaturalSpawnGetPacket() {}
|
||||
|
||||
@Override
|
||||
public Enum getType() {
|
||||
|
||||
+1
-2
@@ -26,8 +26,7 @@ public final class NaturalSpawnRemovePacket extends AbstractPacket {
|
||||
this.spawnId = spawnId;
|
||||
}
|
||||
|
||||
public NaturalSpawnRemovePacket() {
|
||||
}
|
||||
public NaturalSpawnRemovePacket() {}
|
||||
|
||||
@Override
|
||||
public Enum getType() {
|
||||
|
||||
+1
-2
@@ -29,8 +29,7 @@ public final class NaturalSpawnSavePacket extends AbstractPacket {
|
||||
this.spawnNBT = spawnNBT;
|
||||
}
|
||||
|
||||
public NaturalSpawnSavePacket() {
|
||||
}
|
||||
public NaturalSpawnSavePacket() {}
|
||||
|
||||
@Override
|
||||
public Enum getType() {
|
||||
|
||||
@@ -30,8 +30,7 @@ public final class RemoteDeletePacket extends AbstractPacket {
|
||||
this.entityId = entityId;
|
||||
}
|
||||
|
||||
public RemoteDeletePacket() {
|
||||
}
|
||||
public RemoteDeletePacket() {}
|
||||
|
||||
@Override
|
||||
public Enum getType() {
|
||||
|
||||
@@ -10,6 +10,7 @@ import kamkeel.npcs.network.PacketHandler;
|
||||
import kamkeel.npcs.network.PacketUtil;
|
||||
import kamkeel.npcs.network.enums.EnumItemPacketType;
|
||||
import kamkeel.npcs.network.enums.EnumRequestPacket;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import noppes.npcs.CustomNpcsPermissions;
|
||||
@@ -17,13 +18,19 @@ import noppes.npcs.LogWriter;
|
||||
import noppes.npcs.NoppesUtilServer;
|
||||
import noppes.npcs.config.ConfigDebug;
|
||||
import noppes.npcs.constants.EnumGuiType;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public final class RemoteMainMenuPacket extends AbstractPacket {
|
||||
public static String packetName = "Request|RemoteMainMenu";
|
||||
|
||||
public RemoteMainMenuPacket() {
|
||||
private int entityID;
|
||||
|
||||
public RemoteMainMenuPacket() {}
|
||||
|
||||
public RemoteMainMenuPacket(int entityID) {
|
||||
this.entityID = entityID;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -49,7 +56,7 @@ public final class RemoteMainMenuPacket extends AbstractPacket {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void sendData(ByteBuf out) throws IOException {
|
||||
// No extra data since npc is provided externally.
|
||||
out.writeInt(this.entityID);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -58,12 +65,14 @@ public final class RemoteMainMenuPacket extends AbstractPacket {
|
||||
return;
|
||||
if (!PacketUtil.verifyItemPacket(EnumItemPacketType.WAND, player))
|
||||
return;
|
||||
NoppesUtilServer.sendOpenGui(player, EnumGuiType.MainMenuDisplay, npc);
|
||||
if (ConfigDebug.PlayerLogging && FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER) {
|
||||
LogWriter.script(String.format("[%s] (Player) %s OPEN NPC %s (%s, %s, %s) [%s]",
|
||||
"WAND", player.getCommandSenderName(), npc.display.getName(),
|
||||
(int) npc.posX, (int) npc.posY, (int) npc.posZ,
|
||||
npc.worldObj.getWorldInfo().getWorldName()));
|
||||
|
||||
Entity entity = player.worldObj.getEntityByID(in.readInt());
|
||||
if(!(entity instanceof EntityNPCInterface))
|
||||
return;
|
||||
|
||||
NoppesUtilServer.sendOpenGui(player, EnumGuiType.MainMenuDisplay, (EntityNPCInterface) entity);
|
||||
if(ConfigDebug.PlayerLogging && FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER){
|
||||
LogWriter.script(String.format("[%s] (Player) %s OPEN NPC %s (%s, %s, %s) [%s]", "WAND", player.getCommandSenderName(), ((EntityNPCInterface)entity).display.getName(), entity.posX, entity.posY, entity.posZ, entity.worldObj.getWorldInfo().getWorldName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,16 +9,23 @@ import kamkeel.npcs.network.PacketHandler;
|
||||
import kamkeel.npcs.network.PacketUtil;
|
||||
import kamkeel.npcs.network.enums.EnumItemPacketType;
|
||||
import kamkeel.npcs.network.enums.EnumRequestPacket;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import noppes.npcs.CustomNpcsPermissions;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public final class RemoteResetPacket extends AbstractPacket {
|
||||
public static String packetName = "Request|RemoteReset";
|
||||
|
||||
public RemoteResetPacket() {
|
||||
private int entityID;
|
||||
|
||||
public RemoteResetPacket() {}
|
||||
|
||||
public RemoteResetPacket(int entityID) {
|
||||
this.entityID = entityID;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -44,6 +51,7 @@ public final class RemoteResetPacket extends AbstractPacket {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void sendData(ByteBuf out) throws IOException {
|
||||
out.writeInt(this.entityID);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -52,6 +60,11 @@ public final class RemoteResetPacket extends AbstractPacket {
|
||||
return;
|
||||
if (!PacketUtil.verifyItemPacket(EnumItemPacketType.WAND, player))
|
||||
return;
|
||||
|
||||
Entity entity = player.worldObj.getEntityByID(in.readInt());
|
||||
if(!(entity instanceof EntityNPCInterface))
|
||||
return;
|
||||
npc = (EntityNPCInterface) entity;
|
||||
npc.reset();
|
||||
}
|
||||
}
|
||||
@@ -9,16 +9,22 @@ import kamkeel.npcs.network.PacketHandler;
|
||||
import kamkeel.npcs.network.PacketUtil;
|
||||
import kamkeel.npcs.network.enums.EnumItemPacketType;
|
||||
import kamkeel.npcs.network.enums.EnumRequestPacket;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import noppes.npcs.CustomNpcsPermissions;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public final class RemoteTpToNpcPacket extends AbstractPacket {
|
||||
public static String packetName = "Request|RemoteTpToNpc";
|
||||
|
||||
public RemoteTpToNpcPacket() {
|
||||
private int entityID;
|
||||
public RemoteTpToNpcPacket() {}
|
||||
|
||||
public RemoteTpToNpcPacket(int entityID) {
|
||||
this.entityID = entityID;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -44,6 +50,7 @@ public final class RemoteTpToNpcPacket extends AbstractPacket {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void sendData(ByteBuf out) throws IOException {
|
||||
out.writeInt(this.entityID);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -52,6 +59,10 @@ public final class RemoteTpToNpcPacket extends AbstractPacket {
|
||||
return;
|
||||
if (!PacketUtil.verifyItemPacket(EnumItemPacketType.WAND, player))
|
||||
return;
|
||||
Entity entity = player.worldObj.getEntityByID(in.readInt());
|
||||
if(!(entity instanceof EntityNPCInterface))
|
||||
return;
|
||||
npc = (EntityNPCInterface) entity;
|
||||
((EntityPlayerMP) player).playerNetServerHandler.setPlayerLocation(npc.posX, npc.posY, npc.posZ, 0, 0);
|
||||
}
|
||||
}
|
||||
+13
-3
@@ -21,7 +21,12 @@ import java.io.IOException;
|
||||
public final class QuestCategoryGetPacket extends AbstractPacket {
|
||||
public static String packetName = "Request|QuestCategoryGet";
|
||||
|
||||
public QuestCategoryGetPacket() {
|
||||
private int categoryID;
|
||||
|
||||
public QuestCategoryGetPacket() {}
|
||||
|
||||
public QuestCategoryGetPacket(int categoryID) {
|
||||
this.categoryID = categoryID;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -37,12 +42,17 @@ public final class QuestCategoryGetPacket extends AbstractPacket {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void sendData(ByteBuf out) throws IOException {
|
||||
out.writeInt(this.categoryID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receiveData(ByteBuf in, EntityPlayer player) throws IOException {
|
||||
if (!(player instanceof EntityPlayerMP)) return;
|
||||
if (!PacketUtil.verifyItemPacket(EnumItemPacketType.WAND, player)) return;
|
||||
if (!(player instanceof EntityPlayerMP))
|
||||
return;
|
||||
|
||||
if (!PacketUtil.verifyItemPacket(EnumItemPacketType.WAND, player))
|
||||
return;
|
||||
|
||||
int id = in.readInt();
|
||||
QuestCategory category = QuestController.Instance.categories.get(id);
|
||||
if (category != null) {
|
||||
|
||||
+7
-4
@@ -26,8 +26,7 @@ public final class QuestCategoryRemovePacket extends AbstractPacket {
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public QuestCategoryRemovePacket() {
|
||||
}
|
||||
public QuestCategoryRemovePacket() {}
|
||||
|
||||
@Override
|
||||
public Enum getType() {
|
||||
@@ -52,8 +51,12 @@ public final class QuestCategoryRemovePacket extends AbstractPacket {
|
||||
|
||||
@Override
|
||||
public void receiveData(ByteBuf in, EntityPlayer player) throws IOException {
|
||||
if (!(player instanceof EntityPlayerMP)) return;
|
||||
if (!PacketUtil.verifyItemPacket(EnumItemPacketType.WAND, player)) return;
|
||||
if (!(player instanceof EntityPlayerMP))
|
||||
return;
|
||||
|
||||
if (!PacketUtil.verifyItemPacket(EnumItemPacketType.WAND, player))
|
||||
return;
|
||||
|
||||
int id = in.readInt();
|
||||
QuestController.Instance.removeCategory(id);
|
||||
NoppesUtilServer.sendQuestCategoryData((EntityPlayerMP) player);
|
||||
|
||||
+6
-2
@@ -55,8 +55,12 @@ public final class QuestCategorySavePacket extends AbstractPacket {
|
||||
|
||||
@Override
|
||||
public void receiveData(ByteBuf in, EntityPlayer player) throws IOException {
|
||||
if (!(player instanceof EntityPlayerMP)) return;
|
||||
if (!PacketUtil.verifyItemPacket(EnumItemPacketType.WAND, player)) return;
|
||||
if (!(player instanceof EntityPlayerMP))
|
||||
return;
|
||||
|
||||
if (!PacketUtil.verifyItemPacket(EnumItemPacketType.WAND, player))
|
||||
return;
|
||||
|
||||
NBTTagCompound compound = ByteBufUtils.readNBT(in);
|
||||
QuestCategory category = new QuestCategory();
|
||||
category.readNBT(compound);
|
||||
|
||||
+20
-3
@@ -22,7 +22,16 @@ import java.io.IOException;
|
||||
public final class QuestDialogGetTitlePacket extends AbstractPacket {
|
||||
public static String packetName = "Request|QuestDialogGetTitle";
|
||||
|
||||
public QuestDialogGetTitlePacket() {
|
||||
private int dialogOne;
|
||||
private int dialogTwo;
|
||||
private int dialogThree;
|
||||
|
||||
public QuestDialogGetTitlePacket() {}
|
||||
|
||||
public QuestDialogGetTitlePacket(int dialogOne, int dialogTwo, int dialogThree) {
|
||||
this.dialogOne = dialogOne;
|
||||
this.dialogTwo = dialogTwo;
|
||||
this.dialogThree = dialogThree;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -43,12 +52,19 @@ public final class QuestDialogGetTitlePacket extends AbstractPacket {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void sendData(ByteBuf out) throws IOException {
|
||||
out.writeInt(dialogOne);
|
||||
out.writeInt(dialogTwo);
|
||||
out.writeInt(dialogThree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receiveData(ByteBuf in, EntityPlayer player) throws IOException {
|
||||
if (!(player instanceof EntityPlayerMP)) return;
|
||||
if (!PacketUtil.verifyItemPacket(EnumItemPacketType.WAND, player)) return;
|
||||
if (!(player instanceof EntityPlayerMP))
|
||||
return;
|
||||
|
||||
if (!PacketUtil.verifyItemPacket(EnumItemPacketType.WAND, player))
|
||||
return;
|
||||
|
||||
Dialog quest = DialogController.Instance.dialogs.get(in.readInt());
|
||||
Dialog quest2 = DialogController.Instance.dialogs.get(in.readInt());
|
||||
Dialog quest3 = DialogController.Instance.dialogs.get(in.readInt());
|
||||
@@ -59,6 +75,7 @@ public final class QuestDialogGetTitlePacket extends AbstractPacket {
|
||||
compound.setString("2", quest2.title);
|
||||
if (quest3 != null)
|
||||
compound.setString("3", quest3.title);
|
||||
|
||||
GuiDataPacket.sendGuiData((EntityPlayerMP) player, compound);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package kamkeel.npcs.network.packets.request.quest;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import kamkeel.npcs.network.AbstractPacket;
|
||||
import kamkeel.npcs.network.PacketChannel;
|
||||
import kamkeel.npcs.network.PacketHandler;
|
||||
import kamkeel.npcs.network.PacketUtil;
|
||||
import kamkeel.npcs.network.enums.EnumItemPacketType;
|
||||
import kamkeel.npcs.network.enums.EnumRequestPacket;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import noppes.npcs.CustomNpcsPermissions;
|
||||
import noppes.npcs.NoppesUtilServer;
|
||||
import noppes.npcs.controllers.DialogController;
|
||||
import noppes.npcs.controllers.QuestController;
|
||||
import noppes.npcs.controllers.data.Dialog;
|
||||
import noppes.npcs.controllers.data.Quest;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public final class QuestRemovePacket extends AbstractPacket {
|
||||
public static String packetName = "Request|DialogRemove";
|
||||
|
||||
private int questID;
|
||||
private boolean sendGroup;
|
||||
|
||||
public QuestRemovePacket(int questID, boolean sendGroup) {
|
||||
this.questID = questID;
|
||||
this.sendGroup = sendGroup;
|
||||
}
|
||||
|
||||
public QuestRemovePacket() {}
|
||||
|
||||
@Override
|
||||
public Enum getType() {
|
||||
return EnumRequestPacket.QuestRemove;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PacketChannel getChannel() {
|
||||
return PacketHandler.REQUEST_PACKET;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CustomNpcsPermissions.Permission getPermission() {
|
||||
return CustomNpcsPermissions.GLOBAL_DIALOG;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void sendData(ByteBuf out) throws IOException {
|
||||
out.writeInt(questID);
|
||||
out.writeBoolean(sendGroup);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receiveData(ByteBuf in, EntityPlayer player) throws IOException {
|
||||
if (!(player instanceof EntityPlayerMP))
|
||||
return;
|
||||
if (!PacketUtil.verifyItemPacket(EnumItemPacketType.WAND, player))
|
||||
return;
|
||||
|
||||
Quest quest = QuestController.Instance.quests.get(in.readInt());
|
||||
boolean sendGroup = in.readBoolean();
|
||||
if(quest != null){
|
||||
QuestController.Instance.removeQuest(quest);
|
||||
if(sendGroup){
|
||||
NoppesUtilServer.sendQuestGroup((EntityPlayerMP) player,quest.category);
|
||||
}
|
||||
else {
|
||||
NoppesUtilServer.sendQuestData((EntityPlayerMP) player,quest.category);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -61,8 +61,12 @@ public final class QuestSavePacket extends AbstractPacket {
|
||||
|
||||
@Override
|
||||
public void receiveData(ByteBuf in, EntityPlayer player) throws IOException {
|
||||
if (!(player instanceof EntityPlayerMP)) return;
|
||||
if (!PacketUtil.verifyItemPacket(EnumItemPacketType.WAND, player)) return;
|
||||
if (!(player instanceof EntityPlayerMP))
|
||||
return;
|
||||
|
||||
if (!PacketUtil.verifyItemPacket(EnumItemPacketType.WAND, player))
|
||||
return;
|
||||
|
||||
int cat = in.readInt();
|
||||
NBTTagCompound compound = ByteBufUtils.readNBT(in);
|
||||
boolean sendGroup = in.readBoolean();
|
||||
|
||||
@@ -26,8 +26,7 @@ public final class RecipeGetPacket extends AbstractPacket {
|
||||
this.recipeId = recipeId;
|
||||
}
|
||||
|
||||
public RecipeGetPacket() {
|
||||
}
|
||||
public RecipeGetPacket() {}
|
||||
|
||||
@Override
|
||||
public Enum getType() {
|
||||
|
||||
@@ -29,8 +29,7 @@ public final class RecipeSavePacket extends AbstractPacket {
|
||||
this.recipeNBT = recipeNBT;
|
||||
}
|
||||
|
||||
public RecipeSavePacket() {
|
||||
}
|
||||
public RecipeSavePacket() {}
|
||||
|
||||
@Override
|
||||
public Enum getType() {
|
||||
|
||||
@@ -24,8 +24,7 @@ public final class RecipesGetPacket extends AbstractPacket {
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public RecipesGetPacket() {
|
||||
}
|
||||
public RecipesGetPacket() {}
|
||||
|
||||
@Override
|
||||
public Enum getType() {
|
||||
|
||||
@@ -449,249 +449,13 @@ public class PacketHandlerServer{
|
||||
}
|
||||
|
||||
private void wandPackets(EnumPacketServer type, ByteBuf buffer, EntityPlayerMP player, EntityNPCInterface npc) throws IOException{
|
||||
if(type == EnumPacketServer.BanksGet){
|
||||
NoppesUtilServer.sendBankDataAll(player);
|
||||
}
|
||||
else if(type == EnumPacketServer.BankGet){
|
||||
Bank bank = BankController.getInstance().getBank(buffer.readInt());
|
||||
NoppesUtilServer.sendBank(player,bank);
|
||||
}
|
||||
else if(type == EnumPacketServer.BankSave){
|
||||
Bank bank = new Bank();
|
||||
bank.readEntityFromNBT(ByteBufUtils.readNBT(buffer));
|
||||
BankController.getInstance().saveBank(bank);
|
||||
NoppesUtilServer.sendBankDataAll(player);
|
||||
NoppesUtilServer.sendBank(player,bank);
|
||||
}
|
||||
else if(type == EnumPacketServer.BankRemove){
|
||||
BankController.getInstance().removeBank(buffer.readInt());
|
||||
NoppesUtilServer.sendBankDataAll(player);
|
||||
NoppesUtilServer.sendBank(player,new Bank());
|
||||
}
|
||||
else if(type == EnumPacketServer.RemoteMainMenu){
|
||||
Entity entity = player.worldObj.getEntityByID(buffer.readInt());
|
||||
if(entity == null || !(entity instanceof EntityNPCInterface))
|
||||
return;
|
||||
NoppesUtilServer.sendOpenGui(player, EnumGuiType.MainMenuDisplay, (EntityNPCInterface) entity);
|
||||
if(ConfigDebug.PlayerLogging && FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER){
|
||||
LogWriter.script(String.format("[%s] (Player) %s OPEN NPC %s (%s, %s, %s) [%s]", "WAND", player.getCommandSenderName(), ((EntityNPCInterface)entity).display.getName(), entity.posX, entity.posY, entity.posZ, entity.worldObj.getWorldInfo().getWorldName()));
|
||||
}
|
||||
}
|
||||
else if(type == EnumPacketServer.RemoteGlobalMenu){
|
||||
NoppesUtilServer.sendOpenGui(player, EnumGuiType.GlobalRemote, null);
|
||||
if(ConfigDebug.PlayerLogging && FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER){
|
||||
LogWriter.script(String.format("[%s] (Player) %s OPEN GLOBAL MENU", "WAND", player.getCommandSenderName()));
|
||||
}
|
||||
}
|
||||
else if(type == EnumPacketServer.RemoteDelete){
|
||||
Entity entity = player.worldObj.getEntityByID(buffer.readInt());
|
||||
if(entity == null || !(entity instanceof EntityNPCInterface))
|
||||
return;
|
||||
npc = (EntityNPCInterface) entity;
|
||||
if(ConfigDebug.PlayerLogging && FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER){
|
||||
LogWriter.script(String.format("[%s] (Player) %s DELETE NPC %s (%s, %s, %s) [%s]", "WAND", player.getCommandSenderName(), npc.display.getName(), (int)npc.posX, (int)npc.posY, (int)npc.posZ, npc.worldObj.getWorldInfo().getWorldName()));
|
||||
}
|
||||
npc.delete();
|
||||
NoppesUtilServer.deleteNpc(npc,player);
|
||||
NoppesUtilServer.sendNearbyNpcs(player);
|
||||
}
|
||||
else if(type == EnumPacketServer.RemoteNpcsGet){
|
||||
NoppesUtilServer.sendNearbyNpcs(player);
|
||||
}
|
||||
else if(type == EnumPacketServer.RemoteFreeze){
|
||||
CustomNpcs.FreezeNPCs = !CustomNpcs.FreezeNPCs;
|
||||
ScrollSelectedPacket.setSelectedList(player, CustomNpcs.FreezeNPCs?"Unfreeze NPCs":"Freeze NPCs");
|
||||
}
|
||||
else if(type == EnumPacketServer.RemoteFreezeGet){
|
||||
ScrollSelectedPacket.setSelectedList(player, CustomNpcs.FreezeNPCs?"Unfreeze NPCs":"Freeze NPCs");
|
||||
}
|
||||
else if(type == EnumPacketServer.RemoteReset){
|
||||
Entity entity = player.worldObj.getEntityByID(buffer.readInt());
|
||||
if(entity == null || !(entity instanceof EntityNPCInterface))
|
||||
return;
|
||||
npc = (EntityNPCInterface) entity;
|
||||
npc.reset();
|
||||
}
|
||||
else if(type == EnumPacketServer.RemoteTpToNpc){
|
||||
Entity entity = player.worldObj.getEntityByID(buffer.readInt());
|
||||
if(entity == null || !(entity instanceof EntityNPCInterface))
|
||||
return;
|
||||
npc = (EntityNPCInterface) entity;
|
||||
player.playerNetServerHandler.setPlayerLocation(npc.posX, npc.posY, npc.posZ, 0, 0);
|
||||
}
|
||||
else if(type == EnumPacketServer.Gui){
|
||||
EnumGuiType gui = EnumGuiType.values()[buffer.readInt()];
|
||||
int i = buffer.readInt();
|
||||
int j = buffer.readInt();
|
||||
int k = buffer.readInt();
|
||||
NoppesUtilServer.sendOpenGui(player, gui, npc, i, j, k);
|
||||
}
|
||||
else if(type == EnumPacketServer.RecipesGet){
|
||||
NoppesUtilServer.sendRecipeData(player,buffer.readInt());
|
||||
}
|
||||
else if(type == EnumPacketServer.RecipeGet){
|
||||
RecipeCarpentry recipe = RecipeController.Instance.getRecipe(buffer.readInt());
|
||||
NoppesUtilServer.setRecipeGui(player,recipe);
|
||||
}
|
||||
else if(type == EnumPacketServer.RecipeRemove){
|
||||
RecipeCarpentry recipe = RecipeController.Instance.delete(buffer.readInt());
|
||||
NoppesUtilServer.sendRecipeData(player, recipe.isGlobal?3:4);
|
||||
NoppesUtilServer.setRecipeGui(player,new RecipeCarpentry(""));
|
||||
}
|
||||
else if(type == EnumPacketServer.RecipeSave){
|
||||
RecipeCarpentry recipe = RecipeController.Instance.saveRecipe(ByteBufUtils.readNBT(buffer));
|
||||
NoppesUtilServer.sendRecipeData(player, recipe.isGlobal?3:4);
|
||||
NoppesUtilServer.setRecipeGui(player,recipe);
|
||||
}
|
||||
else if(type == EnumPacketServer.NaturalSpawnGetAll){
|
||||
ScrollDataPacket.sendScrollData(player, SpawnController.Instance.getScroll());
|
||||
}
|
||||
else if(type == EnumPacketServer.NaturalSpawnGet){
|
||||
SpawnData spawn = SpawnController.Instance.getSpawnData(buffer.readInt());
|
||||
if(spawn != null){
|
||||
GuiDataPacket.sendGuiData(player, spawn.writeNBT(new NBTTagCompound()));
|
||||
}
|
||||
}
|
||||
else if(type == EnumPacketServer.NaturalSpawnSave){
|
||||
SpawnData data = new SpawnData();
|
||||
data.readNBT(ByteBufUtils.readNBT(buffer));
|
||||
SpawnController.Instance.saveSpawnData(data);
|
||||
|
||||
ScrollDataPacket.sendScrollData(player, SpawnController.Instance.getScroll());
|
||||
}
|
||||
else if(type == EnumPacketServer.NaturalSpawnRemove){
|
||||
SpawnController.Instance.removeSpawnData(buffer.readInt());
|
||||
ScrollDataPacket.sendScrollData(player, SpawnController.Instance.getScroll());
|
||||
}
|
||||
else if(type == EnumPacketServer.DialogCategorySave){
|
||||
DialogCategory category = new DialogCategory();
|
||||
category.readNBT(ByteBufUtils.readNBT(buffer));
|
||||
DialogController.Instance.saveCategory(category);
|
||||
ScrollDataPacket.sendScrollData(player, DialogController.Instance.getScroll());
|
||||
}
|
||||
else if(type == EnumPacketServer.DialogCategoryRemove){
|
||||
DialogController.Instance.removeCategory(buffer.readInt());
|
||||
ScrollDataPacket.sendScrollData(player, DialogController.Instance.getScroll());
|
||||
}
|
||||
else if(type == EnumPacketServer.DialogCategoryGet){
|
||||
DialogCategory category = DialogController.Instance.categories.get(buffer.readInt());
|
||||
if(category != null){
|
||||
NBTTagCompound comp = category.writeNBT(new NBTTagCompound());
|
||||
comp.removeTag("Dialogs");
|
||||
GuiDataPacket.sendGuiData(player, comp);
|
||||
}
|
||||
}
|
||||
else if(type == EnumPacketServer.DialogSave){
|
||||
int category = buffer.readInt();
|
||||
Dialog dialog = new Dialog();
|
||||
dialog.readNBT(ByteBufUtils.readNBT(buffer));
|
||||
boolean sendGroup = buffer.readBoolean();
|
||||
DialogController.Instance.saveDialog(category,dialog);
|
||||
if(dialog.category != null){
|
||||
if(sendGroup){
|
||||
NoppesUtilServer.sendDialogGroup(player,dialog.category);
|
||||
}
|
||||
else {
|
||||
NoppesUtilServer.sendDialogData(player,dialog.category);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(type == EnumPacketServer.QuestOpenGui){
|
||||
if(type == EnumPacketServer.QuestOpenGui){
|
||||
Quest quest = new Quest();
|
||||
int gui = buffer.readInt();
|
||||
quest.readNBT(ByteBufUtils.readNBT(buffer));
|
||||
NoppesUtilServer.setEditingQuest(player,quest);
|
||||
player.openGui(CustomNpcs.instance, gui , player.worldObj, 0, 0, 0);
|
||||
}
|
||||
else if(type == EnumPacketServer.DialogRemove){
|
||||
int diagId = buffer.readInt();
|
||||
boolean sendGroup = buffer.readBoolean();
|
||||
Dialog dialog = DialogController.Instance.dialogs.get(diagId);
|
||||
if(dialog != null && dialog.category != null){
|
||||
DialogController.Instance.removeDialog(dialog);
|
||||
if(sendGroup){
|
||||
NoppesUtilServer.sendDialogGroup(player,dialog.category);
|
||||
}
|
||||
else {
|
||||
NoppesUtilServer.sendDialogData(player,dialog.category);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(type == EnumPacketServer.DialogNpcGet){
|
||||
NoppesUtilServer.sendNpcDialogs(player);
|
||||
}
|
||||
else if(type == EnumPacketServer.DialogNpcSet){
|
||||
int slot = buffer.readInt();
|
||||
int dialog = buffer.readInt();
|
||||
DialogOption option = NoppesUtilServer.setNpcDialog(slot,dialog,player);
|
||||
if(option != null && option.hasDialog()){
|
||||
NBTTagCompound compound = option.writeNBT();
|
||||
compound.setInteger("Position", slot);
|
||||
GuiDataPacket.sendGuiData(player, compound);
|
||||
}
|
||||
}
|
||||
else if(type == EnumPacketServer.DialogNpcRemove){
|
||||
npc.dialogs.remove(buffer.readInt());
|
||||
}
|
||||
else if(type == EnumPacketServer.QuestCategoryGet){
|
||||
QuestCategory category = QuestController.Instance.categories.get(buffer.readInt());
|
||||
if(category != null){
|
||||
NBTTagCompound comp = category.writeNBT(new NBTTagCompound());
|
||||
comp.removeTag("Dialogs");
|
||||
GuiDataPacket.sendGuiData(player, comp);
|
||||
}
|
||||
}
|
||||
else if(type == EnumPacketServer.QuestCategorySave){
|
||||
QuestCategory category = new QuestCategory();
|
||||
category.readNBT(ByteBufUtils.readNBT(buffer));
|
||||
QuestController.Instance.saveCategory(category);
|
||||
NoppesUtilServer.sendQuestCategoryData(player);
|
||||
}
|
||||
else if(type == EnumPacketServer.QuestCategoryRemove){
|
||||
QuestController.Instance.removeCategory(buffer.readInt());
|
||||
NoppesUtilServer.sendQuestCategoryData(player);
|
||||
}
|
||||
else if(type == EnumPacketServer.QuestSave){
|
||||
int category = buffer.readInt();
|
||||
Quest quest = new Quest();
|
||||
quest.readNBT(ByteBufUtils.readNBT(buffer));
|
||||
boolean sendGroup = buffer.readBoolean();
|
||||
QuestController.Instance.saveQuest(category, quest);
|
||||
if(quest.category != null){
|
||||
if(sendGroup){
|
||||
NoppesUtilServer.sendQuestGroup(player, quest.category);
|
||||
}
|
||||
else {
|
||||
NoppesUtilServer.sendQuestData(player, quest.category);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(type == EnumPacketServer.QuestDialogGetTitle){
|
||||
Dialog quest = DialogController.Instance.dialogs.get(buffer.readInt());
|
||||
Dialog quest2 = DialogController.Instance.dialogs.get(buffer.readInt());
|
||||
Dialog quest3 = DialogController.Instance.dialogs.get(buffer.readInt());
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
if(quest != null)
|
||||
compound.setString("1", quest.title);
|
||||
if(quest2 != null)
|
||||
compound.setString("2", quest2.title);
|
||||
if(quest3 != null)
|
||||
compound.setString("3", quest3.title);
|
||||
GuiDataPacket.sendGuiData(player, compound);
|
||||
}
|
||||
else if(type == EnumPacketServer.QuestRemove){
|
||||
Quest quest = QuestController.Instance.quests.get(buffer.readInt());
|
||||
boolean sendGroup = buffer.readBoolean();
|
||||
if(quest != null){
|
||||
QuestController.Instance.removeQuest(quest);
|
||||
if(sendGroup){
|
||||
NoppesUtilServer.sendQuestGroup(player,quest.category);
|
||||
}
|
||||
else {
|
||||
NoppesUtilServer.sendQuestData(player,quest.category);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(type == EnumPacketServer.TransportCategoriesGet){
|
||||
NoppesUtilServer.sendTransportCategoryData(player);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package noppes.npcs.client;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.request.GuiRequestPacket;
|
||||
import kamkeel.npcs.util.ByteBufUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
@@ -39,7 +41,7 @@ public class NoppesUtil {
|
||||
}
|
||||
|
||||
public static void requestOpenGUI(EnumGuiType gui, int i, int j, int k) {
|
||||
Client.sendData(EnumPacketServer.Gui, gui.ordinal(), i, j, k);
|
||||
PacketClient.sendClient(new GuiRequestPacket(gui.ordinal(), i, j, k));
|
||||
}
|
||||
|
||||
public static void updateSkinOverlayData(EntityPlayer player, NBTTagCompound compound) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package noppes.npcs.client.gui;
|
||||
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.request.npc.*;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiYesNo;
|
||||
import net.minecraft.client.gui.GuiYesNoCallback;
|
||||
@@ -22,8 +24,8 @@ public class GuiNpcRemoteEditor extends GuiNPCInterface implements IScrollData,
|
||||
super();
|
||||
xSize = 256;
|
||||
setBackground("menubg.png");
|
||||
Client.sendData(EnumPacketServer.RemoteNpcsGet);
|
||||
Client.sendData(EnumPacketServer.RemoteFreezeGet);
|
||||
PacketClient.sendClient(new RemoteNpcsGetPacket());
|
||||
PacketClient.sendClient(new RemoteFreezeGetPacket());
|
||||
}
|
||||
public void initGui()
|
||||
{
|
||||
@@ -53,7 +55,7 @@ public class GuiNpcRemoteEditor extends GuiNPCInterface implements IScrollData,
|
||||
@Override
|
||||
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);
|
||||
}
|
||||
@@ -61,11 +63,11 @@ public class GuiNpcRemoteEditor extends GuiNPCInterface implements IScrollData,
|
||||
{
|
||||
int id = guibutton.id;
|
||||
if(id == 3){
|
||||
Client.sendData(EnumPacketServer.RemoteFreeze);
|
||||
PacketClient.sendClient(new RemoteFreezePacket());
|
||||
}
|
||||
if(id == 5){
|
||||
for(int ids : data.values()){
|
||||
Client.sendData(EnumPacketServer.RemoteReset, ids);
|
||||
PacketClient.sendClient(new RemoteResetPacket(ids));
|
||||
Entity entity = player.worldObj.getEntityByID(ids);
|
||||
if(entity != null && entity instanceof EntityNPCInterface)
|
||||
((EntityNPCInterface)entity).reset();
|
||||
@@ -73,27 +75,28 @@ public class GuiNpcRemoteEditor extends GuiNPCInterface implements IScrollData,
|
||||
}
|
||||
if(id == 6){
|
||||
NoppesUtil.setLastNpc(null);
|
||||
Client.sendData(EnumPacketServer.RemoteGlobalMenu);
|
||||
PacketClient.sendClient(new RemoteGlobalMenuPacket());
|
||||
}
|
||||
|
||||
if(!data.containsKey(scroll.getSelected()))
|
||||
return;
|
||||
|
||||
if(id == 0){
|
||||
Client.sendData(EnumPacketServer.RemoteMainMenu,data.get(scroll.getSelected()));
|
||||
PacketClient.sendClient(new RemoteMainMenuPacket(data.get(scroll.getSelected())));
|
||||
}
|
||||
if(id == 1){
|
||||
GuiYesNo guiyesno = new GuiYesNo(this, "Confirm", StatCollector.translateToLocal("gui.delete"), 0);
|
||||
displayGuiScreen(guiyesno);
|
||||
}
|
||||
if(id == 2){
|
||||
Client.sendData(EnumPacketServer.RemoteReset,data.get(scroll.getSelected()));
|
||||
Entity entity = player.worldObj.getEntityByID(data.get(scroll.getSelected()));
|
||||
int selected = data.get(scroll.getSelected());
|
||||
PacketClient.sendClient(new RemoteResetPacket(selected));
|
||||
Entity entity = player.worldObj.getEntityByID(selected);
|
||||
if(entity != null && entity instanceof EntityNPCInterface)
|
||||
((EntityNPCInterface)entity).reset();
|
||||
}
|
||||
if(id == 4){
|
||||
Client.sendData(EnumPacketServer.RemoteTpToNpc,data.get(scroll.getSelected()));
|
||||
PacketClient.sendClient(new RemoteTpToNpcPacket(data.get(scroll.getSelected())));
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package noppes.npcs.client.gui;
|
||||
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.request.dialog.DialogSavePacket;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.client.Client;
|
||||
@@ -196,10 +198,10 @@ public class SubGuiNpcDialog extends SubGuiInterface implements ISubGuiListener,
|
||||
dialog.quest = ob;
|
||||
parent.dialogQuestName = name;
|
||||
initGui();
|
||||
Client.sendData(EnumPacketServer.DialogSave, this.dialogCategoryID, dialog.writeToNBT(new NBTTagCompound()));
|
||||
PacketClient.sendClient(new DialogSavePacket(this.dialogCategoryID, dialog.writeToNBT(new NBTTagCompound()), false));
|
||||
}
|
||||
|
||||
public void save(){
|
||||
Client.sendData(EnumPacketServer.DialogSave, this.dialogCategoryID, dialog.writeToNBT(new NBTTagCompound()));
|
||||
PacketClient.sendClient(new DialogSavePacket(this.dialogCategoryID, dialog.writeToNBT(new NBTTagCompound()), false));
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package noppes.npcs.client.gui;
|
||||
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.request.dialog.DialogSavePacket;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.client.Client;
|
||||
@@ -419,7 +421,7 @@ public class SubGuiNpcDialogVisual extends SubGuiInterface implements ISubGuiLis
|
||||
public void save() {
|
||||
GuiNpcTextField.unfocus();
|
||||
if(dialog.id >= 0)
|
||||
Client.sendData(EnumPacketServer.DialogSave, ((SubGuiNpcDialog)parent).dialogCategoryID, dialog.writeToNBT(new NBTTagCompound()));
|
||||
PacketClient.sendClient(new DialogSavePacket(((SubGuiNpcDialog)parent).dialogCategoryID, dialog.writeToNBT(new NBTTagCompound()), false));
|
||||
}
|
||||
|
||||
private DialogImage getSelectedImage() {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package noppes.npcs.client.gui;
|
||||
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.request.quest.QuestSavePacket;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.client.Client;
|
||||
@@ -218,10 +220,10 @@ public class SubGuiNpcQuest extends SubGuiInterface implements ISubGuiListener,
|
||||
quest.nextQuestTitle = name;
|
||||
parent.nextQuestName = name;
|
||||
initGui();
|
||||
Client.sendData(EnumPacketServer.QuestSave, this.questCategoryID, quest.writeToNBT(new NBTTagCompound()));
|
||||
PacketClient.sendClient(new QuestSavePacket(this.questCategoryID, quest.writeToNBT(new NBTTagCompound()), false));
|
||||
}
|
||||
|
||||
public void save(){
|
||||
Client.sendData(EnumPacketServer.QuestSave, this.questCategoryID, quest.writeToNBT(new NBTTagCompound()));
|
||||
PacketClient.sendClient(new QuestSavePacket(this.questCategoryID, quest.writeToNBT(new NBTTagCompound()), false));
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,9 @@
|
||||
package noppes.npcs.client.gui.advanced;
|
||||
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.request.dialog.DialogNpcGetPacket;
|
||||
import kamkeel.npcs.network.packets.request.dialog.DialogNpcRemovePacket;
|
||||
import kamkeel.npcs.network.packets.request.dialog.DialogNpcSetPacket;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -21,7 +25,7 @@ public class GuiNPCDialogNpcOptions extends GuiNPCInterface2 implements GuiSelec
|
||||
super(npc);
|
||||
this.parent = parent;
|
||||
this.drawDefaultBackground = true;
|
||||
Client.sendData(EnumPacketServer.DialogNpcGet);
|
||||
PacketClient.sendClient(new DialogNpcGetPacket());
|
||||
}
|
||||
|
||||
public void initGui() {
|
||||
@@ -55,7 +59,7 @@ public class GuiNPCDialogNpcOptions extends GuiNPCInterface2 implements GuiSelec
|
||||
if (id >= 20 && id < 40) {
|
||||
int slot = id - 20;
|
||||
data.remove(slot);
|
||||
Client.sendData(EnumPacketServer.DialogNpcRemove,slot);
|
||||
PacketClient.sendClient(new DialogNpcRemovePacket(slot));
|
||||
initGui();
|
||||
}
|
||||
}
|
||||
@@ -66,7 +70,7 @@ public class GuiNPCDialogNpcOptions extends GuiNPCInterface2 implements GuiSelec
|
||||
|
||||
@Override
|
||||
public void selected(int id, String name) {
|
||||
Client.sendData(EnumPacketServer.DialogNpcSet, selectedSlot, id);
|
||||
PacketClient.sendClient(new DialogNpcSetPacket(selectedSlot, id));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
package noppes.npcs.client.gui.global;
|
||||
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.request.bank.BankGetPacket;
|
||||
import kamkeel.npcs.network.packets.request.bank.BankRemovePacket;
|
||||
import kamkeel.npcs.network.packets.request.bank.BankSavePacket;
|
||||
import kamkeel.npcs.network.packets.request.bank.BanksGetPacket;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.client.Client;
|
||||
@@ -23,13 +28,13 @@ public class GuiNPCManageBanks extends GuiContainerNPCInterface2 implements IScr
|
||||
private Bank bank = new Bank();
|
||||
private String selected = null;
|
||||
private String search = "";
|
||||
|
||||
|
||||
public GuiNPCManageBanks(EntityNPCInterface npc,ContainerManageBanks container)
|
||||
{
|
||||
super(npc,container);
|
||||
this.container = container;
|
||||
drawDefaultBackground = false;
|
||||
Client.sendData(EnumPacketServer.BanksGet);
|
||||
PacketClient.sendClient(new BanksGetPacket());
|
||||
setBackground("npcbanksetup.png");
|
||||
ySize = 200;
|
||||
}
|
||||
@@ -37,7 +42,7 @@ public class GuiNPCManageBanks extends GuiContainerNPCInterface2 implements IScr
|
||||
public void initGui()
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
|
||||
this.addButton(new GuiNpcButton(6,guiLeft + 340, guiTop + 10, 45, 20, "gui.add"));
|
||||
this.addButton(new GuiNpcButton(7,guiLeft + 340, guiTop + 32, 45, 20, "gui.remove"));
|
||||
if(scroll == null)
|
||||
@@ -46,21 +51,21 @@ public class GuiNPCManageBanks extends GuiContainerNPCInterface2 implements IScr
|
||||
scroll.guiLeft = guiLeft + 174;
|
||||
scroll.guiTop = guiTop + 8;
|
||||
addScroll(scroll);
|
||||
|
||||
|
||||
for(int i = 0; i < 6; i++){
|
||||
int x = guiLeft + 6;
|
||||
int y = (guiTop + 36) + (i * 22);
|
||||
addButton(new GuiNpcButton(i, x + 50, y,80, 20, new String[]{"Can Upgrade","Can't Upgrade","Upgraded"},0));
|
||||
getButton(i).setEnabled(false);
|
||||
}
|
||||
|
||||
|
||||
addTextField(new GuiNpcTextField(0,this, this.fontRendererObj, guiLeft+8, guiTop + 8, 160, 16, ""));
|
||||
getTextField(0).setMaxStringLength(20);
|
||||
|
||||
|
||||
addTextField(new GuiNpcTextField(1,this, this.fontRendererObj, guiLeft+10, guiTop + 80, 16, 16, ""));
|
||||
getTextField(1).integersOnly = true;
|
||||
getTextField(1).setMaxStringLength(1);
|
||||
|
||||
|
||||
addTextField(new GuiNpcTextField(2,this, this.fontRendererObj, guiLeft+10, guiTop + 110, 16, 16, ""));
|
||||
getTextField(2).integersOnly = true;
|
||||
getTextField(2).setMaxStringLength(1);
|
||||
@@ -85,15 +90,15 @@ public class GuiNPCManageBanks extends GuiContainerNPCInterface2 implements IScr
|
||||
name += "_";
|
||||
Bank bank = new Bank();
|
||||
bank.name = name;
|
||||
|
||||
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
bank.writeEntityToNBT(compound);
|
||||
Client.sendData(EnumPacketServer.BankSave, compound);
|
||||
PacketClient.sendClient(new BankSavePacket(compound));
|
||||
}
|
||||
else if(button.id == 7)
|
||||
{
|
||||
if(data.containsKey(scroll.getSelected()))
|
||||
Client.sendData(EnumPacketServer.BankRemove, data.get(selected));
|
||||
PacketClient.sendClient(new BankRemovePacket(data.get(selected)));
|
||||
}
|
||||
else if(button.id >= 0 && button.id < 6)
|
||||
{
|
||||
@@ -103,7 +108,7 @@ public class GuiNPCManageBanks extends GuiContainerNPCInterface2 implements IScr
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int par1, int par2)
|
||||
{
|
||||
{
|
||||
fontRendererObj.drawString("Tab Cost", 23, 28, CustomNpcResourceListener.DefaultTextColor);
|
||||
fontRendererObj.drawString("Upg. Cost", 123, 28, CustomNpcResourceListener.DefaultTextColor);
|
||||
fontRendererObj.drawString("Start", 6, 70, CustomNpcResourceListener.DefaultTextColor);
|
||||
@@ -115,28 +120,28 @@ public class GuiNPCManageBanks extends GuiContainerNPCInterface2 implements IScr
|
||||
Bank bank = new Bank();
|
||||
bank.readEntityFromNBT(compound);
|
||||
this.bank = bank;
|
||||
|
||||
|
||||
if (bank.id == -1) {
|
||||
getTextField(0).setText("");
|
||||
getTextField(1).setText("");
|
||||
getTextField(2).setText("");
|
||||
|
||||
getTextField(2).setText("");
|
||||
|
||||
for(int i = 0; i < 6; i++)
|
||||
{
|
||||
getButton(i).setDisplay(0);
|
||||
getButton(i).setDisplay(0);
|
||||
getButton(i).setEnabled(false);
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
getTextField(0).setText(bank.name);
|
||||
getTextField(1).setText(Integer.toString(bank.startSlots));
|
||||
getTextField(2).setText(Integer.toString(bank.maxSlots));
|
||||
|
||||
getTextField(2).setText(Integer.toString(bank.maxSlots));
|
||||
|
||||
for(int i = 0; i < 6; i++)
|
||||
{
|
||||
int type = 0;
|
||||
if(bank.slotTypes.containsKey(i))
|
||||
type = bank.slotTypes.get(i);
|
||||
getButton(i).setDisplay(type);
|
||||
getButton(i).setDisplay(type);
|
||||
getButton(i).setEnabled(true);
|
||||
}
|
||||
}
|
||||
@@ -173,27 +178,27 @@ public class GuiNPCManageBanks extends GuiContainerNPCInterface2 implements IScr
|
||||
String name = scroll.getSelected();
|
||||
this.data = data;
|
||||
scroll.setList(getSearchList());
|
||||
|
||||
|
||||
if(name != null)
|
||||
scroll.setSelected(name);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setSelected(String selected) {
|
||||
this.selected = selected;
|
||||
scroll.setSelected(selected);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void customScrollClicked(int i, int j, int k, GuiCustomScroll guiCustomScroll) {
|
||||
if(guiCustomScroll.id == 0)
|
||||
{
|
||||
save();
|
||||
selected = scroll.getSelected();
|
||||
Client.sendData(EnumPacketServer.BankGet, data.get(selected));
|
||||
PacketClient.sendClient(new BankGetPacket(data.get(selected)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void save() {
|
||||
if(selected != null && data.containsKey(selected) && bank != null){
|
||||
@@ -201,7 +206,7 @@ public class GuiNPCManageBanks extends GuiContainerNPCInterface2 implements IScr
|
||||
bank.currencyInventory = container.bank.currencyInventory;
|
||||
bank.upgradeInventory = container.bank.upgradeInventory;
|
||||
bank.writeEntityToNBT(compound);
|
||||
Client.sendData(EnumPacketServer.BankSave, compound);
|
||||
PacketClient.sendClient(new BankSavePacket(compound));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,27 +225,27 @@ public class GuiNPCManageBanks extends GuiContainerNPCInterface2 implements IScr
|
||||
}
|
||||
} else if(guiNpcTextField.id == 1 || guiNpcTextField.id == 2) {
|
||||
int num = 1;
|
||||
|
||||
|
||||
if(!guiNpcTextField.isEmpty())
|
||||
num = guiNpcTextField.getInteger();
|
||||
|
||||
|
||||
if(num > 6)
|
||||
num = 6;
|
||||
|
||||
|
||||
if(num < 0)
|
||||
num = 0;
|
||||
|
||||
|
||||
if(guiNpcTextField.id == 1) {
|
||||
bank.startSlots = num;
|
||||
} else if(guiNpcTextField.id == 2) {
|
||||
bank.maxSlots = num;
|
||||
}
|
||||
|
||||
|
||||
if(bank.startSlots > bank.maxSlots)
|
||||
bank.maxSlots = bank.startSlots;
|
||||
|
||||
|
||||
guiNpcTextField.setText(Integer.toString(num));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package noppes.npcs.client.gui.global;
|
||||
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.request.dialog.*;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiYesNo;
|
||||
import net.minecraft.client.gui.GuiYesNoCallback;
|
||||
@@ -181,7 +183,7 @@ public class GuiNPCManageDialogs extends GuiNPCInterface2 implements IScrollGrou
|
||||
}
|
||||
DialogCategory category = new DialogCategory();
|
||||
category.title = name;
|
||||
Client.sendData(EnumPacketServer.DialogCategorySave, category.writeNBT(new NBTTagCompound()));
|
||||
PacketClient.sendClient(new DialogCategorySavePacket(category.writeNBT(new NBTTagCompound())));
|
||||
}
|
||||
// Remove Cat
|
||||
if(id == 5){
|
||||
@@ -202,7 +204,7 @@ public class GuiNPCManageDialogs extends GuiNPCInterface2 implements IScrollGrou
|
||||
}
|
||||
Dialog dialog = new Dialog();
|
||||
dialog.title = name;
|
||||
Client.sendData(EnumPacketServer.DialogSave, category.id, dialog.writeToNBT(new NBTTagCompound()), true);
|
||||
PacketClient.sendClient(new DialogSavePacket(category.id, dialog.writeToNBT(new NBTTagCompound()), true));
|
||||
}
|
||||
// Remove Dialog
|
||||
if(id == 2) {
|
||||
@@ -231,7 +233,7 @@ public class GuiNPCManageDialogs extends GuiNPCInterface2 implements IScrollGrou
|
||||
Dialog dialog = new Dialog();
|
||||
dialog.readNBTPartial(this.dialog.writeToNBT(new NBTTagCompound()));
|
||||
dialog.title = name;
|
||||
Client.sendData(EnumPacketServer.DialogSave, category.id, dialog.writeToNBT(new NBTTagCompound()), true);
|
||||
PacketClient.sendClient(new DialogSavePacket(category.id, dialog.writeToNBT(new NBTTagCompound()), true));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -341,7 +343,7 @@ public class GuiNPCManageDialogs extends GuiNPCInterface2 implements IScrollGrou
|
||||
dialog = null;
|
||||
getTextField(66).setText("");
|
||||
|
||||
Client.sendData(EnumPacketServer.DialogCategoryGet, catData.get(selected));
|
||||
PacketClient.sendClient(new DialogCategoryGetPacket(catData.get(selected)));
|
||||
setPrevCatName(selected);
|
||||
}
|
||||
}
|
||||
@@ -371,13 +373,13 @@ public class GuiNPCManageDialogs extends GuiNPCInterface2 implements IScrollGrou
|
||||
if(saveDiag){
|
||||
if(dialogScroll.selected != -1 && dialog.id >= 0){
|
||||
if(catScroll.selected != -1 && category.id >= 0){
|
||||
Client.sendData(EnumPacketServer.DialogSave, category.id, dialog.writeToNBT(new NBTTagCompound()), true);
|
||||
PacketClient.sendClient(new DialogSavePacket(category.id, dialog.writeToNBT(new NBTTagCompound()), true));
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(catScroll.selected != -1 && category.id >= 0)
|
||||
Client.sendData(EnumPacketServer.DialogCategorySave, category.writeNBT(new NBTTagCompound()));
|
||||
PacketClient.sendClient(new DialogCategorySavePacket(category.writeNBT(new NBTTagCompound())));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -426,13 +428,13 @@ public class GuiNPCManageDialogs extends GuiNPCInterface2 implements IScrollGrou
|
||||
return;
|
||||
if(id == 5) {
|
||||
if(catData.containsKey(catScroll.getSelected())) {
|
||||
Client.sendData(EnumPacketServer.DialogCategoryRemove, category.id);
|
||||
PacketClient.sendClient(new DialogCategoryRemovePacket(category.id));
|
||||
clearCategory();
|
||||
}
|
||||
}
|
||||
if(id == 2) {
|
||||
if (dialogData.containsKey(dialogScroll.getSelected())) {
|
||||
Client.sendData(EnumPacketServer.DialogRemove, dialog.id, true);
|
||||
PacketClient.sendClient(new DialogRemovePacket(dialog.id, true));
|
||||
dialog = new Dialog();
|
||||
dialogData.clear();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package noppes.npcs.client.gui.global;
|
||||
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.request.quest.*;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.GuiYesNo;
|
||||
@@ -186,7 +188,7 @@ public class GuiNPCManageQuest extends GuiNPCInterface2 implements IScrollGroup,
|
||||
}
|
||||
QuestCategory category = new QuestCategory();
|
||||
category.title = name;
|
||||
Client.sendData(EnumPacketServer.QuestCategorySave, category.writeNBT(new NBTTagCompound()));
|
||||
PacketClient.sendClient(new QuestCategorySavePacket(category.writeNBT(new NBTTagCompound())));
|
||||
}
|
||||
// Remove Cat
|
||||
if(id == 5){
|
||||
@@ -207,8 +209,8 @@ public class GuiNPCManageQuest extends GuiNPCInterface2 implements IScrollGroup,
|
||||
}
|
||||
Quest quest = new Quest();
|
||||
quest.title = name;
|
||||
Client.sendData(EnumPacketServer.QuestSave, category.id, quest.writeToNBT(new NBTTagCompound()), true);
|
||||
}
|
||||
PacketClient.sendClient(new QuestSavePacket(category.id, quest.writeToNBT(new NBTTagCompound()), true));
|
||||
}
|
||||
// Remove Quest
|
||||
if(id == 2) {
|
||||
if (questData.containsKey(questScroll.getSelected())) {
|
||||
@@ -236,8 +238,8 @@ public class GuiNPCManageQuest extends GuiNPCInterface2 implements IScrollGroup,
|
||||
Quest quest = new Quest();
|
||||
quest.readNBTPartial(this.quest.writeToNBT(new NBTTagCompound()));
|
||||
quest.title = name;
|
||||
Client.sendData(EnumPacketServer.QuestSave, category.id, quest.writeToNBT(new NBTTagCompound()), true);
|
||||
}
|
||||
PacketClient.sendClient(new QuestSavePacket(category.id, quest.writeToNBT(new NBTTagCompound()), true));
|
||||
}
|
||||
}
|
||||
}
|
||||
updateButtons();
|
||||
@@ -346,7 +348,7 @@ public class GuiNPCManageQuest extends GuiNPCInterface2 implements IScrollGroup,
|
||||
quest = null;
|
||||
getTextField(66).setText("");
|
||||
|
||||
Client.sendData(EnumPacketServer.QuestCategoryGet, catData.get(selected));
|
||||
PacketClient.sendClient(new QuestCategoryGetPacket(catData.get(selected)));
|
||||
setPrevCatName(selected);
|
||||
}
|
||||
}
|
||||
@@ -376,13 +378,13 @@ public class GuiNPCManageQuest extends GuiNPCInterface2 implements IScrollGroup,
|
||||
if(saveQuest){
|
||||
if(questScroll.selected != -1 && quest.id >= 0){
|
||||
if(catScroll.selected != -1 && category.id >= 0){
|
||||
Client.sendData(EnumPacketServer.QuestSave, category.id, quest.writeToNBT(new NBTTagCompound()), true);
|
||||
PacketClient.sendClient(new QuestSavePacket(category.id, quest.writeToNBT(new NBTTagCompound()), true));
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(catScroll.selected != -1 && category.id >= 0)
|
||||
Client.sendData(EnumPacketServer.QuestCategorySave, category.writeNBT(new NBTTagCompound()));
|
||||
PacketClient.sendClient(new QuestCategorySavePacket(category.writeNBT(new NBTTagCompound())));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -431,12 +433,12 @@ public class GuiNPCManageQuest extends GuiNPCInterface2 implements IScrollGroup,
|
||||
return;
|
||||
if(id == 5) {
|
||||
if(catData.containsKey(catScroll.getSelected())) {
|
||||
Client.sendData(EnumPacketServer.QuestCategoryRemove, category.id);
|
||||
PacketClient.sendClient(new QuestCategoryRemovePacket(category.id));
|
||||
clearCategory();
|
||||
}
|
||||
}
|
||||
if(id == 2) {
|
||||
Client.sendData(EnumPacketServer.QuestRemove, quest.id, true);
|
||||
PacketClient.sendClient(new QuestRemovePacket(quest.id, true));
|
||||
quest = new Quest();
|
||||
questData.clear();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
package noppes.npcs.client.gui.global;
|
||||
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.request.recipe.RecipeGetPacket;
|
||||
import kamkeel.npcs.network.packets.request.recipe.RecipeRemovePacket;
|
||||
import kamkeel.npcs.network.packets.request.recipe.RecipeSavePacket;
|
||||
import kamkeel.npcs.network.packets.request.recipe.RecipesGetPacket;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@@ -30,7 +35,7 @@ public class GuiNpcManageRecipes extends GuiContainerNPCInterface2 implements IS
|
||||
super(npc,container);
|
||||
this.container = container;
|
||||
drawDefaultBackground = false;
|
||||
Client.sendData(EnumPacketServer.RecipesGet,container.width);
|
||||
PacketClient.sendClient(new RecipesGetPacket(container.width));
|
||||
setBackground("inventorymenu.png");
|
||||
slot = getResource("slot.png");
|
||||
ySize = 200;
|
||||
@@ -94,11 +99,11 @@ public class GuiNpcManageRecipes extends GuiContainerNPCInterface2 implements IS
|
||||
name += "_";
|
||||
RecipeCarpentry recipe = new RecipeCarpentry(name);
|
||||
recipe.isGlobal = container.width == 3;
|
||||
Client.sendData(EnumPacketServer.RecipeSave,recipe.writeNBT());
|
||||
PacketClient.sendClient(new RecipeSavePacket(recipe.writeNBT()));
|
||||
}
|
||||
if(button.id == 4){
|
||||
if(data.containsKey(scroll.getSelected())){
|
||||
Client.sendData(EnumPacketServer.RecipeRemove, data.get(scroll.getSelected()));
|
||||
PacketClient.sendClient(new RecipeRemovePacket(data.get(scroll.getSelected())));
|
||||
scroll.clear();
|
||||
}
|
||||
}
|
||||
@@ -186,7 +191,7 @@ public class GuiNpcManageRecipes extends GuiContainerNPCInterface2 implements IS
|
||||
public void customScrollClicked(int i, int j, int k, GuiCustomScroll guiCustomScroll) {
|
||||
save();
|
||||
selected = scroll.getSelected();
|
||||
Client.sendData(EnumPacketServer.RecipeGet, data.get(selected));
|
||||
PacketClient.sendClient(new RecipeGetPacket(data.get(selected)));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -194,7 +199,7 @@ public class GuiNpcManageRecipes extends GuiContainerNPCInterface2 implements IS
|
||||
GuiNpcTextField.unfocus();
|
||||
if(selected != null && data.containsKey(selected)){
|
||||
container.saveRecipe();
|
||||
Client.sendData(EnumPacketServer.RecipeSave, container.recipe.writeNBT());
|
||||
PacketClient.sendClient(new RecipeSavePacket(container.recipe.writeNBT()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
package noppes.npcs.client.gui.global;
|
||||
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.request.naturalspawns.NaturalSpawnGetAllPacket;
|
||||
import kamkeel.npcs.network.packets.request.naturalspawns.NaturalSpawnGetPacket;
|
||||
import kamkeel.npcs.network.packets.request.naturalspawns.NaturalSpawnRemovePacket;
|
||||
import kamkeel.npcs.network.packets.request.naturalspawns.NaturalSpawnSavePacket;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.StatCollector;
|
||||
@@ -25,7 +30,7 @@ public class GuiNpcNaturalSpawns extends GuiNPCInterface2 implements IGuiData, I
|
||||
|
||||
public GuiNpcNaturalSpawns(EntityNPCInterface npc) {
|
||||
super(npc);
|
||||
Client.sendData(EnumPacketServer.NaturalSpawnGetAll);
|
||||
PacketClient.sendClient(new NaturalSpawnGetAllPacket());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -129,12 +134,12 @@ public class GuiNpcNaturalSpawns extends GuiNPCInterface2 implements IGuiData, I
|
||||
|
||||
SpawnData spawn = new SpawnData();
|
||||
spawn.name = name;
|
||||
Client.sendData(EnumPacketServer.NaturalSpawnSave, spawn.writeNBT(new NBTTagCompound()));
|
||||
PacketClient.sendClient(new NaturalSpawnSavePacket(spawn.writeNBT(new NBTTagCompound())));
|
||||
this.spawnEntryScroll.selected = -1;
|
||||
}
|
||||
if(id == 2){
|
||||
if(data.containsKey(scrollNaturalSpawns.getSelected())) {
|
||||
Client.sendData(EnumPacketServer.NaturalSpawnRemove, spawn.id);
|
||||
PacketClient.sendClient(new NaturalSpawnRemovePacket(spawn.id));
|
||||
spawn = new SpawnData();
|
||||
scrollNaturalSpawns.clear();
|
||||
this.spawnEntryScroll.selected = -1;
|
||||
@@ -224,7 +229,7 @@ public class GuiNpcNaturalSpawns extends GuiNPCInterface2 implements IGuiData, I
|
||||
save();
|
||||
String selected = scrollNaturalSpawns.getSelected();
|
||||
spawn = new SpawnData();
|
||||
Client.sendData(EnumPacketServer.NaturalSpawnGet, data.get(selected));
|
||||
PacketClient.sendClient(new NaturalSpawnGetPacket(data.get(selected)));
|
||||
}
|
||||
if (guiCustomScroll.id == 20) {
|
||||
initGui();
|
||||
@@ -235,7 +240,7 @@ public class GuiNpcNaturalSpawns extends GuiNPCInterface2 implements IGuiData, I
|
||||
public void save() {
|
||||
GuiNpcTextField.unfocus();
|
||||
if(spawn.id >= 0)
|
||||
Client.sendData(EnumPacketServer.NaturalSpawnSave, spawn.writeNBT(new NBTTagCompound()));
|
||||
PacketClient.sendClient(new NaturalSpawnSavePacket(spawn.writeNBT(new NBTTagCompound())));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package noppes.npcs.client.gui.questtypes;
|
||||
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.request.quest.QuestDialogGetTitlePacket;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -34,10 +36,12 @@ public class GuiNpcQuestTypeDialog extends SubGuiInterface implements GuiSelecti
|
||||
xSize = 256;
|
||||
ySize = 216;
|
||||
closeOnEsc = true;
|
||||
Client.sendData(EnumPacketServer.QuestDialogGetTitle,
|
||||
quest.dialogs.containsKey(0)?quest.dialogs.get(0):-1,
|
||||
quest.dialogs.containsKey(1)?quest.dialogs.get(1):-1,
|
||||
quest.dialogs.containsKey(2)?quest.dialogs.get(2):-1);
|
||||
|
||||
PacketClient.sendClient(new QuestDialogGetTitlePacket(
|
||||
quest.dialogs.getOrDefault(0, -1),
|
||||
quest.dialogs.getOrDefault(1, -1),
|
||||
quest.dialogs.getOrDefault(2, -1))
|
||||
);
|
||||
}
|
||||
|
||||
public void initGui() {
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package noppes.npcs.client.gui.roles;
|
||||
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.request.bank.BankGetPacket;
|
||||
import kamkeel.npcs.network.packets.request.bank.BanksGetPacket;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.client.Client;
|
||||
@@ -25,7 +28,7 @@ public class GuiNpcBankSetup extends GuiNPCInterface2 implements IScrollData,ICu
|
||||
public GuiNpcBankSetup(EntityNPCInterface npc)
|
||||
{
|
||||
super(npc);
|
||||
Client.sendData(EnumPacketServer.BanksGet);
|
||||
PacketClient.sendClient(new BanksGetPacket());
|
||||
role = (RoleBank) npc.roleInterface;
|
||||
}
|
||||
|
||||
@@ -43,9 +46,9 @@ public class GuiNpcBankSetup extends GuiNPCInterface2 implements IScrollData,ICu
|
||||
protected void actionPerformed(GuiButton guibutton)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setData(Vector<String> list, HashMap<String, Integer> data)
|
||||
public void setData(Vector<String> list, HashMap<String, Integer> data)
|
||||
{
|
||||
String name = null;
|
||||
Bank bank = role.getBank();
|
||||
@@ -53,23 +56,23 @@ public class GuiNpcBankSetup extends GuiNPCInterface2 implements IScrollData,ICu
|
||||
name = bank.name;
|
||||
this.data = data;
|
||||
scroll.setList(list);
|
||||
|
||||
|
||||
if(name != null)
|
||||
setSelected(name);
|
||||
}
|
||||
|
||||
|
||||
public void mouseClicked(int i, int j, int k)
|
||||
{
|
||||
super.mouseClicked(i, j, k);
|
||||
if(k == 0 && scroll != null)
|
||||
scroll.mouseClicked(i, j, k);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setSelected(String selected) {
|
||||
scroll.setSelected(selected);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void customScrollClicked(int i, int j, int k, GuiCustomScroll guiCustomScroll) {
|
||||
if(guiCustomScroll.id == 0)
|
||||
@@ -78,7 +81,7 @@ public class GuiNpcBankSetup extends GuiNPCInterface2 implements IScrollData,ICu
|
||||
save();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void save() {
|
||||
Client.sendData(EnumPacketServer.RoleSave, role.writeToNBT(new NBTTagCompound()));
|
||||
}
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
package noppes.npcs.constants;
|
||||
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import noppes.npcs.CustomNpcsPermissions;
|
||||
import noppes.npcs.client.gui.custom.components.CustomGuiButton;
|
||||
|
||||
public enum EnumPacketServer {
|
||||
NPCDelete(CustomNpcsPermissions.NPC_DELETE, true),
|
||||
RemoteMainMenu(CustomNpcsPermissions.NPC_GUI),
|
||||
RemoteGlobalMenu(CustomNpcsPermissions.GLOBAL_REMOTE),
|
||||
NpcMenuClose(CustomNpcsPermissions.NPC_GUI, true),
|
||||
RemoteDelete(CustomNpcsPermissions.NPC_DELETE, true),
|
||||
RemoteFreeze(CustomNpcsPermissions.NPC_FREEZE), RemoteFreezeGet,
|
||||
RemoteReset(CustomNpcsPermissions.NPC_RESET),
|
||||
SpawnMob(CustomNpcsPermissions.SPAWNER_MOB),
|
||||
MobSpawner(CustomNpcsPermissions.SPAWNER_CREATE),
|
||||
@@ -23,8 +17,6 @@ public enum EnumPacketServer {
|
||||
ModelDataSave(CustomNpcsPermissions.NPC_DISPLAY, true),
|
||||
|
||||
MainmenuAdvancedSave(CustomNpcsPermissions.NPC_ADVANCED,true), MainmenuAdvancedGet(true), MainmenuAdvancedMarkData(CustomNpcsPermissions.NPC_ADVANCED,true),
|
||||
DialogNpcSet(CustomNpcsPermissions.NPC_ADVANCED),
|
||||
DialogNpcRemove(CustomNpcsPermissions.NPC_ADVANCED, true),
|
||||
FactionSet(CustomNpcsPermissions.NPC_ADVANCED, true),
|
||||
TagSet(CustomNpcsPermissions.NPC_ADVANCED, true),
|
||||
TransportSave(CustomNpcsPermissions.NPC_ADVANCED, true),
|
||||
@@ -62,12 +54,8 @@ public enum EnumPacketServer {
|
||||
PlayerDataRemove(CustomNpcsPermissions.GLOBAL_PLAYERDATA),
|
||||
PlayerDataMapRegen(CustomNpcsPermissions.GLOBAL_PLAYERDATA),
|
||||
|
||||
BankSave(CustomNpcsPermissions.GLOBAL_BANK), BanksGet, BankGet,
|
||||
BankRemove(CustomNpcsPermissions.GLOBAL_BANK),
|
||||
|
||||
DialogCategorySave(CustomNpcsPermissions.GLOBAL_DIALOG), DialogCategoriesGet, DialogsGetFromDialog,
|
||||
DialogCategoryRemove(CustomNpcsPermissions.GLOBAL_DIALOG), DialogCategoryGet,
|
||||
DialogSave(CustomNpcsPermissions.GLOBAL_DIALOG), DialogsGet, DialogGet,
|
||||
DialogCategoriesGet, DialogsGetFromDialog,
|
||||
DialogsGet, DialogGet,
|
||||
DialogRemove(CustomNpcsPermissions.GLOBAL_DIALOG),
|
||||
|
||||
TransportCategoryRemove(CustomNpcsPermissions.GLOBAL_TRANSPORT), TransportGetLocation(true),
|
||||
@@ -77,32 +65,23 @@ public enum EnumPacketServer {
|
||||
FactionSave(CustomNpcsPermissions.GLOBAL_FACTION), FactionsGet, FactionGet,
|
||||
TagRemove(CustomNpcsPermissions.GLOBAL_TAG),
|
||||
TagSave(CustomNpcsPermissions.GLOBAL_TAG), TagsGet, TagGet, NpcTagsGet,
|
||||
QuestCategorySave(CustomNpcsPermissions.GLOBAL_QUEST), QuestCategoriesGet,
|
||||
QuestCategoriesGet,
|
||||
QuestRemove(CustomNpcsPermissions.GLOBAL_QUEST),
|
||||
QuestCategoryRemove(CustomNpcsPermissions.GLOBAL_QUEST),
|
||||
QuestRewardSave(CustomNpcsPermissions.GLOBAL_QUEST),
|
||||
QuestSave(CustomNpcsPermissions.GLOBAL_QUEST), QuestsGetFromQuest, QuestsGet,
|
||||
QuestDialogGetTitle(CustomNpcsPermissions.GLOBAL_QUEST),
|
||||
RecipeSave(CustomNpcsPermissions.GLOBAL_RECIPE),
|
||||
RecipeRemove(CustomNpcsPermissions.GLOBAL_RECIPE),
|
||||
NaturalSpawnSave(CustomNpcsPermissions.GLOBAL_NATURALSPAWN), NaturalSpawnGet,
|
||||
NaturalSpawnRemove(CustomNpcsPermissions.GLOBAL_NATURALSPAWN),
|
||||
MerchantUpdate(CustomNpcsPermissions.EDIT_VILLAGER),
|
||||
PlayerRider(CustomNpcsPermissions.TOOL_MOUNTER),
|
||||
SpawnRider(CustomNpcsPermissions.TOOL_MOUNTER),
|
||||
MovingPathSave(CustomNpcsPermissions.TOOL_PATHER,true), MovingPathGet(true),
|
||||
DialogNpcGet,
|
||||
|
||||
AnimationsGet, AnimationGet,
|
||||
AnimationRemove(CustomNpcsPermissions.GLOBAL_ANIMATION), AnimationSave(CustomNpcsPermissions.GLOBAL_ANIMATION),
|
||||
|
||||
RecipesGet, RecipeGet, QuestOpenGui, PlayerDataGet, QuestLogToServer, PartyLogToServer, UntrackQuest,
|
||||
QuestOpenGui, PlayerDataGet, QuestLogToServer, PartyLogToServer, UntrackQuest,
|
||||
|
||||
RemoteNpcsGet(CustomNpcsPermissions.NPC_GUI),
|
||||
RemoteTpToNpc(CustomNpcsPermissions.NPC_TELEPORT),
|
||||
QuestGet, QuestCategoryGet,
|
||||
SaveTileEntity,
|
||||
NaturalSpawnGetAll, MailOpenSetup,
|
||||
SaveTileEntity, MailOpenSetup,
|
||||
DimensionsGet, DimensionTeleport, GetTileEntity, Gui, IsGuiOpen, CacheAnimation,
|
||||
|
||||
CustomGuiButton,CustomGuiScrollClick,CustomGuiClose,CustomGuiUnfocused,
|
||||
|
||||
Reference in new issue
Block a user