Profile Tab + Config Sync

This commit is contained in:
Kam committed 2025-01-24 00:29:11 -05:00
1 parent c7c981f4a7
commit 62482c307c
5 files changed
+33

No files matched your search

@@ -7,6 +7,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import noppes.npcs.NoppesUtilServer;
import noppes.npcs.Server;
import noppes.npcs.config.ConfigMain;
import noppes.npcs.constants.EnumPacketClient;
import noppes.npcs.constants.SyncType;
import noppes.npcs.controllers.data.*;
@@ -15,6 +16,16 @@ import java.util.HashMap;
public class SyncController {
public static void syncConfigs(EntityPlayerMP player){
NBTTagCompound nbtTagCompound = new NBTTagCompound();
nbtTagCompound.setBoolean("Profiles", true);
Server.sendData(player, EnumPacketClient.SYNC_CONFIG, nbtTagCompound);
}
public static void receiveConfigs(NBTTagCompound compound){
ConfigMain.EnableProfiles = compound.getBoolean("Profiles");
}
public static void syncPlayer(EntityPlayerMP player){
NBTTagList list = new NBTTagList();
NBTTagCompound compound = new NBTTagCompound();