Search in sources :

Example 36 with QuestingPacket

use of betterquesting.api.network.QuestingPacket in project BetterQuesting by Funwayguy.

the class PartyManager method getSyncPacket.

@Override
public QuestingPacket getSyncPacket() {
    NBTTagCompound tags = new NBTTagCompound();
    tags.setTag("data", writeToNBT(new NBTTagList(), EnumSaveType.CONFIG));
    return new QuestingPacket(PacketTypeNative.PARTY_DATABASE.GetLocation(), tags);
}
Also used : NBTTagList(net.minecraft.nbt.NBTTagList) NBTTagCompound(net.minecraft.nbt.NBTTagCompound) QuestingPacket(betterquesting.api.network.QuestingPacket)

Example 37 with QuestingPacket

use of betterquesting.api.network.QuestingPacket in project BetterQuesting by Funwayguy.

the class NameCache method getSyncPacket.

@Override
public QuestingPacket getSyncPacket() {
    NBTTagCompound tags = new NBTTagCompound();
    tags.setTag("data", this.writeToNBT(new NBTTagList(), EnumSaveType.CONFIG));
    return new QuestingPacket(PacketTypeNative.NAME_CACHE.GetLocation(), tags);
}
Also used : NBTTagList(net.minecraft.nbt.NBTTagList) NBTTagCompound(net.minecraft.nbt.NBTTagCompound) QuestingPacket(betterquesting.api.network.QuestingPacket)

Example 38 with QuestingPacket

use of betterquesting.api.network.QuestingPacket in project BetterQuesting by Funwayguy.

the class QuestSettings method getSyncPacket.

@Override
public QuestingPacket getSyncPacket() {
    NBTTagCompound tags = new NBTTagCompound();
    tags.setTag("data", writeToNBT(new NBTTagCompound(), EnumSaveType.CONFIG));
    return new QuestingPacket(PacketTypeNative.SETTINGS.GetLocation(), tags);
}
Also used : NBTTagCompound(net.minecraft.nbt.NBTTagCompound) QuestingPacket(betterquesting.api.network.QuestingPacket)

Example 39 with QuestingPacket

use of betterquesting.api.network.QuestingPacket in project BetterQuesting by Funwayguy.

the class GuiPrerequisiteEditor method SendChanges.

public void SendChanges() {
    NBTTagCompound tags = new NBTTagCompound();
    NBTTagCompound base = new NBTTagCompound();
    base.setTag("config", quest.writeToNBT(new NBTTagCompound(), EnumSaveType.CONFIG));
    base.setTag("progress", quest.writeToNBT(new NBTTagCompound(), EnumSaveType.PROGRESS));
    tags.setTag("data", base);
    tags.setInteger("questID", QuestDatabase.INSTANCE.getKey(quest));
    tags.setInteger("action", EnumPacketAction.EDIT.ordinal());
    PacketSender.INSTANCE.sendToServer(new QuestingPacket(PacketTypeNative.QUEST_EDIT.GetLocation(), tags));
}
Also used : NBTTagCompound(net.minecraft.nbt.NBTTagCompound) QuestingPacket(betterquesting.api.network.QuestingPacket)

Example 40 with QuestingPacket

use of betterquesting.api.network.QuestingPacket in project BetterQuesting by Funwayguy.

the class GuiQuestLineEditorB method createQuest.

public void createQuest() {
    NBTTagCompound tag = new NBTTagCompound();
    tag.setInteger("action", EnumPacketAction.ADD.ordinal());
    PacketSender.INSTANCE.sendToServer(new QuestingPacket(PacketTypeNative.QUEST_EDIT.GetLocation(), tag));
}
Also used : NBTTagCompound(net.minecraft.nbt.NBTTagCompound) QuestingPacket(betterquesting.api.network.QuestingPacket)

Aggregations

QuestingPacket (betterquesting.api.network.QuestingPacket)40 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)40 GuiButtonQuestInstance (betterquesting.api.client.gui.controls.GuiButtonQuestInstance)6 IQuestLine (betterquesting.api.questing.IQuestLine)6 NBTTagList (net.minecraft.nbt.NBTTagList)6 IQuest (betterquesting.api.questing.IQuest)4 IQuestLineEntry (betterquesting.api.questing.IQuestLineEntry)3 QuestLineEntry (betterquesting.questing.QuestLineEntry)3 GuiQuest (betterquesting.client.gui2.GuiQuest)2 QuestInstance (betterquesting.questing.QuestInstance)2 IQuestDatabase (betterquesting.api.questing.IQuestDatabase)1 IQuestLineDatabase (betterquesting.api.questing.IQuestLineDatabase)1 IPanelButton (betterquesting.api2.client.gui.controls.IPanelButton)1 GuiQuestEditor (betterquesting.client.gui.editors.GuiQuestEditor)1 ImportedQuestLines (betterquesting.client.importers.ImportedQuestLines)1 ImportedQuests (betterquesting.client.importers.ImportedQuests)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 EntityPlayerMP (net.minecraft.entity.player.EntityPlayerMP)1