Reorg -- Data Packets designed to send to Client

This commit is contained in:
Kam committed 2025-01-30 13:54:49 -05:00
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;