mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 12:39:05 +00:00
Huge Commit and Refactoring
This commit is contained in:
1 parent
0124154380
commit
47e30ac8b4
26 files changed
+257
-139
No files matched your search
@@ -456,53 +456,6 @@ public class PacketHandlerServer{
|
||||
NoppesUtilServer.setEditingQuest(player,quest);
|
||||
player.openGui(CustomNpcs.instance, gui , player.worldObj, 0, 0, 0);
|
||||
}
|
||||
else if(type == EnumPacketServer.RoleCompanionUpdate){
|
||||
if(npc.advanced.role != EnumRoleType.Companion)
|
||||
return;
|
||||
((RoleCompanion)npc.roleInterface).matureTo(EnumCompanionStage.values()[buffer.readInt()]);
|
||||
npc.updateClient = true;
|
||||
}
|
||||
else if(type == EnumPacketServer.RoleSave){
|
||||
npc.roleInterface.readFromNBT(ByteBufUtils.readNBT(buffer));
|
||||
npc.updateClient = true;
|
||||
}
|
||||
else if(type == EnumPacketServer.RoleGet){
|
||||
if(npc.roleInterface == null)
|
||||
return;
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
compound.setBoolean("RoleData", true);
|
||||
GuiDataPacket.sendGuiData(player, npc.roleInterface.writeToNBT(compound));
|
||||
}
|
||||
else if(type == EnumPacketServer.MerchantUpdate){
|
||||
Entity entity = player.worldObj.getEntityByID(buffer.readInt());
|
||||
if(entity == null || !(entity instanceof EntityVillager))
|
||||
return;
|
||||
MerchantRecipeList list = MerchantRecipeList.func_151390_b(new PacketBuffer(buffer));
|
||||
((EntityVillager)entity).setRecipes(list);
|
||||
}
|
||||
else if(type == EnumPacketServer.ModelDataSave){
|
||||
if(npc instanceof EntityCustomNpc)
|
||||
((EntityCustomNpc)npc).modelData.readFromNBT(ByteBufUtils.readNBT(buffer));
|
||||
}
|
||||
else if(type == EnumPacketServer.MailOpenSetup){
|
||||
PlayerMail mail = new PlayerMail();
|
||||
mail.readNBT(ByteBufUtils.readNBT(buffer));
|
||||
ContainerMail.staticmail = mail;
|
||||
player.openGui(CustomNpcs.instance, EnumGuiType.PlayerMailman.ordinal(), player.worldObj, 1, 0, 0);
|
||||
}
|
||||
else if(type == EnumPacketServer.TransformSave){
|
||||
boolean isValid = npc.transform.isValid();
|
||||
npc.transform.readOptions(ByteBufUtils.readNBT(buffer));
|
||||
if(isValid != npc.transform.isValid())
|
||||
npc.updateAI = true;
|
||||
}
|
||||
else if(type == EnumPacketServer.TransformGet){
|
||||
GuiDataPacket.sendGuiData(player, npc.transform.writeOptions(new NBTTagCompound()));
|
||||
}
|
||||
else if(type == EnumPacketServer.TransformLoad){
|
||||
if(npc.transform.isValid())
|
||||
npc.transform.transform(buffer.readBoolean());
|
||||
}
|
||||
else if(type == EnumPacketServer.TraderMarketSave){
|
||||
String market = ByteBufUtils.readString(buffer);
|
||||
if(market == null)
|
||||
|
||||
@@ -3,6 +3,7 @@ package noppes.npcs.client;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.request.GuiRequestPacket;
|
||||
import kamkeel.npcs.network.packets.request.IsGuiOpenPacket;
|
||||
import kamkeel.npcs.util.ByteBufUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
@@ -268,6 +269,7 @@ public class NoppesUtil {
|
||||
}
|
||||
|
||||
public static void isGUIOpen(boolean isGUIOpen) {
|
||||
PacketClient.sendClient(new IsGuiOpenPacket(isGUIOpen));
|
||||
Client.sendData(EnumPacketServer.IsGuiOpen, isGUIOpen);
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,8 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.request.MerchantUpdatePacket;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
@@ -109,7 +111,7 @@ public class GuiMerchantAdd extends GuiContainer
|
||||
merchantrecipelist.remove(currentRecipeIndex);
|
||||
if(currentRecipeIndex > 0)
|
||||
currentRecipeIndex--;
|
||||
Client.sendData(EnumPacketServer.MerchantUpdate, ServerEventsHandler.Merchant.getEntityId(), merchantrecipelist);
|
||||
PacketClient.sendClient(new MerchantUpdatePacket(ServerEventsHandler.Merchant.getEntityId(), merchantrecipelist));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,7 +134,7 @@ public class GuiMerchantAdd extends GuiContainer
|
||||
|
||||
MerchantRecipeList merchantrecipelist = this.theIMerchant.getRecipes(mc.thePlayer);
|
||||
merchantrecipelist.add(recipe);
|
||||
Client.sendData(EnumPacketServer.MerchantUpdate, ServerEventsHandler.Merchant.getEntityId(), merchantrecipelist);
|
||||
PacketClient.sendClient(new MerchantUpdatePacket(ServerEventsHandler.Merchant.getEntityId(), merchantrecipelist));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package noppes.npcs.client.gui;
|
||||
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.request.MailOpenSetupPacket;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -63,7 +65,7 @@ public class SubGuiMailmanSendSetup extends SubGuiInterface implements ITextfiel
|
||||
GuiMailmanWrite.parent = getParent();
|
||||
GuiMailmanWrite.mail = mail;
|
||||
|
||||
Client.sendData(EnumPacketServer.MailOpenSetup, mail.writeNBT());
|
||||
PacketClient.sendClient(new MailOpenSetupPacket(mail.writeNBT()));
|
||||
}
|
||||
if(id == 3){
|
||||
setSubGui(new GuiQuestSelection(mail.questId));
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
package noppes.npcs.client.gui.advanced;
|
||||
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.request.transform.TransformGetPacket;
|
||||
import kamkeel.npcs.network.packets.request.transform.TransformLoadPacket;
|
||||
import kamkeel.npcs.network.packets.request.transform.TransformSavePacket;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.client.Client;
|
||||
@@ -14,12 +18,12 @@ import noppes.npcs.entity.EntityNPCInterface;
|
||||
public class GuiNPCNightSetup extends GuiNPCInterface2 implements IGuiData
|
||||
{
|
||||
private DataTransform data;
|
||||
|
||||
|
||||
public GuiNPCNightSetup(EntityNPCInterface npc)
|
||||
{
|
||||
super(npc);
|
||||
data = npc.transform;
|
||||
Client.sendData(EnumPacketServer.TransformGet);
|
||||
PacketClient.sendClient(new TransformGetPacket());
|
||||
}
|
||||
|
||||
public void initGui()
|
||||
@@ -40,16 +44,16 @@ public class GuiNPCNightSetup extends GuiNPCInterface2 implements IGuiData
|
||||
|
||||
this.addLabel(new GuiNpcLabel(4, "menu.advanced", guiLeft + 4, guiTop + 113));
|
||||
this.addButton(new GuiNpcButton(4, guiLeft + 104, guiTop + 108, 50, 20, new String[]{"gui.no","gui.yes"}, data.hasAdvanced?1:0));
|
||||
|
||||
|
||||
this.addLabel(new GuiNpcLabel(5, "role.name", guiLeft + 4, guiTop + 135));
|
||||
this.addButton(new GuiNpcButton(5, guiLeft + 104, guiTop + 130, 50, 20, new String[]{"gui.no","gui.yes"}, data.hasRole?1:0));
|
||||
|
||||
|
||||
this.addLabel(new GuiNpcLabel(6, "job.name", guiLeft + 4, guiTop + 157));
|
||||
this.addButton(new GuiNpcButton(6, guiLeft + 104, guiTop + 152, 50, 20, new String[]{"gui.no","gui.yes"}, data.hasJob?1:0));
|
||||
|
||||
|
||||
this.addLabel(new GuiNpcLabel(10, "advanced.editingmode", guiLeft + 170, guiTop + 9));
|
||||
this.addButton(new GuiNpcButton(10, guiLeft + 244, guiTop + 4, 50, 20, new String[]{"gui.no","gui.yes"}, data.editingModus?1:0));
|
||||
|
||||
|
||||
if(data.editingModus){
|
||||
this.addButton(new GuiNpcButton(11, guiLeft + 170, guiTop + 34, "advanced.loadday"));
|
||||
this.addButton(new GuiNpcButton(12, guiLeft + 170, guiTop + 56, "advanced.loadnight"));
|
||||
@@ -80,16 +84,16 @@ public class GuiNPCNightSetup extends GuiNPCInterface2 implements IGuiData
|
||||
initGui();
|
||||
}
|
||||
if(button.id == 11){
|
||||
Client.sendData(EnumPacketServer.TransformLoad, false);
|
||||
PacketClient.sendClient(new TransformLoadPacket(false));
|
||||
}
|
||||
if(button.id == 12){
|
||||
Client.sendData(EnumPacketServer.TransformLoad, true);
|
||||
PacketClient.sendClient(new TransformLoadPacket(true));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void save() {
|
||||
Client.sendData(EnumPacketServer.TransformSave, data.writeOptions(new NBTTagCompound()));
|
||||
PacketClient.sendClient(new TransformSavePacket(data.writeOptions(new NBTTagCompound())));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,6 +4,7 @@ import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.request.jobs.JobGetPacket;
|
||||
import kamkeel.npcs.network.packets.request.mainmenu.MainmenuAdvancedGetPacket;
|
||||
import kamkeel.npcs.network.packets.request.mainmenu.MainmenuAdvancedSavePacket;
|
||||
import kamkeel.npcs.network.packets.request.role.RoleGetPacket;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.NoppesStringUtils;
|
||||
@@ -60,7 +61,7 @@ public class GuiNpcAdvanced extends GuiNPCInterface2 implements IGuiData
|
||||
GuiNpcButton button = (GuiNpcButton) guibutton;
|
||||
if (button.id == 3) {
|
||||
save();
|
||||
Client.sendData(EnumPacketServer.RoleGet);
|
||||
PacketClient.sendClient(new RoleGetPacket());
|
||||
}
|
||||
if(button.id == 8){
|
||||
hasChanges = true;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package noppes.npcs.client.gui.model;
|
||||
|
||||
import kamkeel.npcs.addon.client.GeckoAddonClient;
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.request.npc.ModelDataSavePacket;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
@@ -380,7 +382,7 @@ public class GuiCreationScreen extends GuiModelInterface implements ICustomScrol
|
||||
|
||||
@Override
|
||||
public void close(){
|
||||
Client.sendData(EnumPacketServer.ModelDataSave, playerdata.writeToNBT());
|
||||
PacketClient.sendClient(new ModelDataSavePacket(playerdata.writeToNBT()));
|
||||
displayGuiScreen(parent);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ 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 kamkeel.npcs.network.packets.request.role.RoleSavePacket;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.client.Client;
|
||||
@@ -83,6 +84,6 @@ public class GuiNpcBankSetup extends GuiNPCInterface2 implements IScrollData,ICu
|
||||
}
|
||||
|
||||
public void save() {
|
||||
Client.sendData(EnumPacketServer.RoleSave, role.writeToNBT(new NBTTagCompound()));
|
||||
PacketClient.sendClient(new RoleSavePacket(role.writeToNBT(new NBTTagCompound())));
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
package noppes.npcs.client.gui.roles;
|
||||
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.request.role.RoleCompanionUpdatePacket;
|
||||
import kamkeel.npcs.network.packets.request.role.RoleSavePacket;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.client.Client;
|
||||
@@ -14,11 +17,11 @@ import noppes.npcs.roles.RoleCompanion;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class GuiNpcCompanion extends GuiNPCInterface2 implements ITextfieldListener, ISliderListener{
|
||||
public class GuiNpcCompanion extends GuiNPCInterface2 implements ITextfieldListener, ISliderListener{
|
||||
private RoleCompanion role;
|
||||
private List<GuiTalent> talents = new ArrayList<GuiTalent>();
|
||||
public GuiNpcCompanion(EntityNPCInterface npc){
|
||||
super(npc);
|
||||
super(npc);
|
||||
role = (RoleCompanion) npc.roleInterface;
|
||||
}
|
||||
|
||||
@@ -27,11 +30,11 @@ public class GuiNpcCompanion extends GuiNPCInterface2 implements ITextfieldListe
|
||||
super.initGui();
|
||||
talents.clear();
|
||||
int y = guiTop + 4;
|
||||
|
||||
|
||||
addButton(new GuiNpcButton(0, guiLeft + 70, y, 90, 20, new String[]{EnumCompanionStage.BABY.name, EnumCompanionStage.CHILD.name, EnumCompanionStage.TEEN.name, EnumCompanionStage.ADULT.name, EnumCompanionStage.FULLGROWN.name}, role.stage.ordinal()));
|
||||
addLabel(new GuiNpcLabel(0, "companion.stage", guiLeft + 4, y + 5));
|
||||
addButton(new GuiNpcButton(1, guiLeft + 162, y, 90, 20, "gui.update"));
|
||||
|
||||
|
||||
addButton(new GuiNpcButton(2, guiLeft + 70, y += 22, 90, 20, new String[]{"gui.no", "gui.yes"}, role.canAge?1:0));
|
||||
addLabel(new GuiNpcLabel(2, "companion.age", guiLeft + 4, y + 5));
|
||||
if(role.canAge){
|
||||
@@ -42,13 +45,13 @@ public class GuiNpcCompanion extends GuiNPCInterface2 implements ITextfieldListe
|
||||
|
||||
talents.add(new GuiTalent(role, EnumCompanionTalent.INVENTORY, guiLeft + 4, y+=26));
|
||||
addSlider(new GuiNpcSlider(this, 10, guiLeft + 30, y + 2, 100, 20, role.getExp(EnumCompanionTalent.INVENTORY)/5000f));
|
||||
|
||||
|
||||
talents.add(new GuiTalent(role, EnumCompanionTalent.ARMOR, guiLeft + 4, y+=26));
|
||||
addSlider(new GuiNpcSlider(this, 11, guiLeft + 30, y + 2, 100, 20, role.getExp(EnumCompanionTalent.ARMOR)/5000f));
|
||||
|
||||
|
||||
talents.add(new GuiTalent(role, EnumCompanionTalent.SWORD, guiLeft + 4, y+=26));
|
||||
addSlider(new GuiNpcSlider(this, 12, guiLeft + 30, y + 2, 100, 20, role.getExp(EnumCompanionTalent.SWORD)/5000f));
|
||||
|
||||
|
||||
// talents.add(new GuiTalent(role, EnumCompanionTalent.RANGED, guiLeft + 4, y+=26));
|
||||
// addSlider(new GuiNpcSlider(this, 13, guiLeft + 30, y + 2, 100, 20, role.getExp(EnumCompanionTalent.RANGED)/5000f));
|
||||
}
|
||||
@@ -63,7 +66,7 @@ public class GuiNpcCompanion extends GuiNPCInterface2 implements ITextfieldListe
|
||||
initGui();
|
||||
}
|
||||
if(guibutton.id == 1){
|
||||
Client.sendData(EnumPacketServer.RoleCompanionUpdate, role.stage.ordinal());
|
||||
PacketClient.sendClient(new RoleCompanionUpdatePacket(role.stage));
|
||||
}
|
||||
if(guibutton.id == 2){
|
||||
GuiNpcButton button = (GuiNpcButton) guibutton;
|
||||
@@ -85,16 +88,16 @@ public class GuiNpcCompanion extends GuiNPCInterface2 implements ITextfieldListe
|
||||
talent.drawScreen(i, j, f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void elementClicked(){
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void save() {
|
||||
Client.sendData(EnumPacketServer.RoleSave, role.writeToNBT(new NBTTagCompound()));
|
||||
PacketClient.sendClient(new RoleSavePacket(role.writeToNBT(new NBTTagCompound())));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -112,13 +115,13 @@ public class GuiNpcCompanion extends GuiNPCInterface2 implements ITextfieldListe
|
||||
@Override
|
||||
public void mousePressed(GuiNpcSlider slider) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseReleased(GuiNpcSlider slider) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package noppes.npcs.client.gui.roles;
|
||||
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.request.role.RoleSavePacket;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -47,13 +49,13 @@ public class GuiNpcFollowerSetup extends GuiContainerNPCInterface2
|
||||
|
||||
addLabel(new GuiNpcLabel(7, "follower.infiniteDays", guiLeft + 180, guiTop + 80));
|
||||
addButton(new GuiNpcButtonYesNo(7, guiLeft + 260, guiTop + 75, role.infiniteDays));
|
||||
|
||||
|
||||
addLabel(new GuiNpcLabel(8, "follower.guiDisabled", guiLeft + 180, guiTop + 104));
|
||||
addButton(new GuiNpcButtonYesNo(8, guiLeft + 260, guiTop + 99, role.disableGui));
|
||||
|
||||
|
||||
addLabel(new GuiNpcLabel(9, "follower.allowSoulstone", guiLeft + 180, guiTop + 128));
|
||||
addButton(new GuiNpcButtonYesNo(9, guiLeft + 260, guiTop + 123, !role.refuseSoulStone));
|
||||
|
||||
|
||||
|
||||
addButton(new GuiNpcButton(10, guiLeft + 195, guiTop + 147, 100, 20, "remote.reset"));
|
||||
}
|
||||
@@ -77,7 +79,7 @@ public class GuiNpcFollowerSetup extends GuiContainerNPCInterface2
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int par1, int par2)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
public void save() {
|
||||
@@ -91,13 +93,13 @@ public class GuiNpcFollowerSetup extends GuiContainerNPCInterface2
|
||||
days = getTextField(i).getInteger();
|
||||
if(days <= 0)
|
||||
days = 1;
|
||||
|
||||
|
||||
map.put(i,days);
|
||||
}
|
||||
}
|
||||
role.rates = map;
|
||||
role.dialogHire = getTextField(3).getText();
|
||||
role.dialogFarewell = getTextField(4).getText();
|
||||
Client.sendData(EnumPacketServer.RoleSave, role.writeToNBT(new NBTTagCompound()));
|
||||
PacketClient.sendClient(new RoleSavePacket(role.writeToNBT(new NBTTagCompound())));
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
|
||||
package noppes.npcs.client.gui.roles;
|
||||
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.request.role.RoleSavePacket;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@@ -86,7 +88,7 @@ public class GuiNpcTraderSetup extends GuiContainerNPCInterface2 implements ITex
|
||||
@Override
|
||||
public void save() {
|
||||
Client.sendData(EnumPacketServer.TraderMarketSave, role.marketName, false);
|
||||
Client.sendData(EnumPacketServer.RoleSave, role.writeToNBT(new NBTTagCompound()));
|
||||
PacketClient.sendClient(new RoleSavePacket(role.writeToNBT(new NBTTagCompound())));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package noppes.npcs.client.gui.util;
|
||||
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.request.npc.NpcClosePacket;
|
||||
import kamkeel.npcs.network.packets.request.npc.NpcDeletePacket;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
@@ -104,7 +107,7 @@ public class GuiNpcMenu implements GuiYesNoCallback {
|
||||
if (npc != null) {
|
||||
npc.reset();
|
||||
if (saveNPC)
|
||||
Client.sendData(EnumPacketServer.NpcMenuClose);
|
||||
PacketClient.sendClient(new NpcClosePacket());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,7 +135,7 @@ public class GuiNpcMenu implements GuiYesNoCallback {
|
||||
public void confirmClicked(boolean flag, int i) {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
if (flag) {
|
||||
Client.sendData(EnumPacketServer.NPCDelete);
|
||||
PacketClient.sendClient(new NpcDeletePacket());
|
||||
mc.displayGuiScreen(null);
|
||||
mc.setIngameFocus();
|
||||
} else {
|
||||
|
||||
@@ -3,23 +3,19 @@ package noppes.npcs.constants;
|
||||
import noppes.npcs.CustomNpcsPermissions;
|
||||
|
||||
public enum EnumPacketServer {
|
||||
NPCDelete(CustomNpcsPermissions.NPC_DELETE, true),
|
||||
NpcMenuClose(CustomNpcsPermissions.NPC_GUI, true),
|
||||
RemoteReset(CustomNpcsPermissions.NPC_RESET),
|
||||
SpawnMob(CustomNpcsPermissions.SPAWNER_MOB),
|
||||
MobSpawner(CustomNpcsPermissions.SPAWNER_CREATE),
|
||||
|
||||
ModelDataSave(CustomNpcsPermissions.NPC_DISPLAY, true),
|
||||
|
||||
TransformSave(CustomNpcsPermissions.NPC_ADVANCED, true), TransformGet(true),
|
||||
TransformLoad(CustomNpcsPermissions.NPC_ADVANCED, true),
|
||||
TraderMarketSave(CustomNpcsPermissions.NPC_ADVANCED, true),
|
||||
|
||||
RoleSave(CustomNpcsPermissions.NPC_ADVANCED, true),
|
||||
RoleGet(true),
|
||||
RoleCompanionUpdate(CustomNpcsPermissions.NPC_ADVANCED, true),
|
||||
|
||||
ClonePreSave(CustomNpcsPermissions.NPC_CLONE), CloneSave(CustomNpcsPermissions.NPC_CLONE), CloneRemove(CustomNpcsPermissions.NPC_CLONE), CloneList, CloneTagList, CloneAllTags, CloneAllTagsShort,
|
||||
ClonePreSave(CustomNpcsPermissions.NPC_CLONE),
|
||||
CloneSave(CustomNpcsPermissions.NPC_CLONE),
|
||||
CloneRemove(CustomNpcsPermissions.NPC_CLONE),
|
||||
CloneList,
|
||||
CloneTagList,
|
||||
CloneAllTags,
|
||||
CloneAllTagsShort,
|
||||
|
||||
ScriptGlobalGuiDataSave(CustomNpcsPermissions.SCRIPT_GLOBAL, false),
|
||||
ScriptGlobalGuiDataGet(false),
|
||||
@@ -65,8 +61,8 @@ public enum EnumPacketServer {
|
||||
|
||||
QuestOpenGui, QuestLogToServer, PartyLogToServer, UntrackQuest,
|
||||
|
||||
QuestGet, QuestCategoryGet,
|
||||
SaveTileEntity, MailOpenSetup,
|
||||
QuestGet,
|
||||
SaveTileEntity,
|
||||
DimensionTeleport, GetTileEntity, IsGuiOpen,
|
||||
|
||||
SavePartyData, CreateParty, GetPartyData, DisbandParty, KickPlayer, LeavePlayer, PartyInvite, GetPartyInviteList, AcceptInvite,
|
||||
|
||||
Reference in new issue
Block a user