mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-28 23:59:40 +00:00
Reorg -- Data Packets designed to send to Client
This commit is contained in:
1 parent
da9ed1d60f
commit
db2144116f
65 files changed
+459
-474
No files matched your search
@@ -1,6 +1,6 @@
|
||||
package noppes.npcs.controllers.data;
|
||||
|
||||
import kamkeel.npcs.network.PacketUtil;
|
||||
import kamkeel.npcs.network.packets.data.large.GuiDataPacket;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.inventory.Container;
|
||||
@@ -108,7 +108,7 @@ public class BankData {
|
||||
container.setCurrency(item);
|
||||
}
|
||||
|
||||
PacketUtil.sendGuiData((EntityPlayerMP) player, compound);
|
||||
GuiDataPacket.sendGuiData((EntityPlayerMP) player, compound);
|
||||
}
|
||||
private ContainerNPCBankInterface getContainer(EntityPlayer player){
|
||||
Container con = player.openContainer;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package noppes.npcs.controllers.data;
|
||||
|
||||
import kamkeel.npcs.addon.DBCAddon;
|
||||
import kamkeel.npcs.network.PacketUtil;
|
||||
import kamkeel.npcs.network.packets.data.AchievementPacket;
|
||||
import kamkeel.npcs.network.packets.data.ChatAlertPacket;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
@@ -265,8 +266,8 @@ public class PlayerData implements IExtendedEntityProperties, IPlayerData {
|
||||
if (party != null && this.partyUUID == null && !this.partyInvites.contains(party.getPartyUUID())) {
|
||||
this.partyInvites.add(party.getPartyUUID());
|
||||
|
||||
PacketUtil.sendAchievement((EntityPlayerMP) player, true, "party.inviteAlert", party.getPartyLeader().getCommandSenderName());
|
||||
PacketUtil.sendChatAlert((EntityPlayerMP) player, "\u00A7a", "party.inviteChat", " ", party.getPartyLeader().getCommandSenderName(), "!");
|
||||
AchievementPacket.sendAchievement((EntityPlayerMP) player, true, "party.inviteAlert", party.getPartyLeader().getCommandSenderName());
|
||||
ChatAlertPacket.sendChatAlert((EntityPlayerMP) player, "\u00A7a", "party.inviteChat", " ", party.getPartyLeader().getCommandSenderName(), "!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package noppes.npcs.controllers.data;
|
||||
|
||||
import kamkeel.npcs.network.PacketHandler;
|
||||
import kamkeel.npcs.network.PacketUtil;
|
||||
import kamkeel.npcs.network.packets.client.OverlayQuestTrackingPacket;
|
||||
import kamkeel.npcs.network.packets.data.AchievementPacket;
|
||||
import kamkeel.npcs.network.packets.data.ChatAlertPacket;
|
||||
import kamkeel.npcs.network.packets.data.OverlayQuestTrackingPacket;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -219,8 +220,8 @@ public class PlayerQuestData implements IPlayerQuestData {
|
||||
QuestData questdata = new QuestData(quest);
|
||||
activeQuests.put(id, questdata);
|
||||
|
||||
PacketUtil.sendAchievement((EntityPlayerMP) parent.player, false, "quest.newquest", quest.title);
|
||||
PacketUtil.sendChatAlert((EntityPlayerMP) parent.player, "quest.newquest", ": ", quest.title);
|
||||
AchievementPacket.sendAchievement((EntityPlayerMP) parent.player, false, "quest.newquest", quest.title);
|
||||
ChatAlertPacket.sendChatAlert((EntityPlayerMP) parent.player, "quest.newquest", ": ", quest.title);
|
||||
parent.updateClient = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package noppes.npcs.controllers.data;
|
||||
|
||||
import kamkeel.npcs.network.PacketUtil;
|
||||
import kamkeel.npcs.network.packets.data.QuestCompletionPacket;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -139,7 +139,7 @@ public class Quest implements ICompatibilty, IQuest {
|
||||
|
||||
public boolean instantComplete(EntityPlayer player, QuestData data) {
|
||||
if(completion == EnumQuestCompletion.Instant && NoppesUtilPlayer.questCompletion((EntityPlayerMP) player, data.quest.id)){
|
||||
PacketUtil.sendQuestComplete((EntityPlayerMP)player, data.quest.writeToNBT(new NBTTagCompound()));
|
||||
QuestCompletionPacket.sendQuestComplete((EntityPlayerMP)player, data.quest.writeToNBT(new NBTTagCompound()));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user