Search in sources :

Example 1 with PktSyncKnowledge

use of hellfirepvp.astralsorcery.common.network.play.server.PktSyncKnowledge in project AstralSorcery by HellFirePvP.

the class ResearchHelper method wipeKnowledge.

public static void wipeKnowledge(ServerPlayerEntity p) {
    ResearchManager.resetPerks(p);
    wipeFile(p);
    playerProgressServer.remove(p.getUniqueID());
    PktProgressionUpdate pkt = new PktProgressionUpdate();
    PacketChannel.CHANNEL.sendToPlayer(p, pkt);
    PktSyncKnowledge pk = new PktSyncKnowledge(PktSyncKnowledge.STATE_WIPE);
    PacketChannel.CHANNEL.sendToPlayer(p, pk);
    loadPlayerKnowledge(p);
    ResearchSyncHelper.pushProgressToClientUnsafe(getProgressServer(p), p);
}
Also used : PktSyncKnowledge(hellfirepvp.astralsorcery.common.network.play.server.PktSyncKnowledge) PktProgressionUpdate(hellfirepvp.astralsorcery.common.network.play.server.PktProgressionUpdate)

Example 2 with PktSyncKnowledge

use of hellfirepvp.astralsorcery.common.network.play.server.PktSyncKnowledge in project AstralSorcery by HellFirePvP.

the class ResearchSyncHelper method pushProgressToClientUnsafe.

public static void pushProgressToClientUnsafe(PlayerProgress progress, PlayerEntity p) {
    PktSyncKnowledge pkt = new PktSyncKnowledge(PktSyncKnowledge.STATE_ADD);
    pkt.load(progress);
    PacketChannel.CHANNEL.sendToPlayer(p, pkt);
}
Also used : PktSyncKnowledge(hellfirepvp.astralsorcery.common.network.play.server.PktSyncKnowledge)

Aggregations

PktSyncKnowledge (hellfirepvp.astralsorcery.common.network.play.server.PktSyncKnowledge)2 PktProgressionUpdate (hellfirepvp.astralsorcery.common.network.play.server.PktProgressionUpdate)1