// Path: src/main/java/uk/kihira/tails/client/outfit/Outfit.java
// public final class Outfit
// {
//     public final UUID id;
//     public String name;
//     public String description;
//     public ArrayList<OutfitPart> parts;
// 
//     public Outfit()
//     {
//         id = UUID.randomUUID();
//         parts = new ArrayList<>();
//     }
// 
//     // todo make a client only multimap of mountpoint <-> outfitpart?
// }
// 
// Path: src/main/java/uk/kihira/tails/common/Tails.java
// @Mod(Tails.MOD_ID)
// public class Tails 
// {
//     public static final String MOD_ID = "tails";
//     public static final Logger LOGGER = LogManager.getLogger(MOD_ID);
//     public static final Gson GSON = new GsonBuilder().create();
//     public static final boolean DEBUG = true;
// 
//     public static boolean hasRemote;
// 
//     public static CommonProxy proxy = DistExecutor.safeRunForDist(() -> ClientProxy::new, () -> CommonProxy::new);
// 
//     public Tails()
//     {
//         FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
//         FMLJavaModLoadingContext.get().getModEventBus().addListener(this::onConfigChange);
//         MinecraftForge.EVENT_BUS.addListener(this::addReloadListener);
//     }
// 
//     private void setup(final FMLCommonSetupEvent event)
//     {
//         proxy.preInit();
//         Config.loadConfig();
// 
//         PartRegistry.loadAllPartsFromResources();
//     }
// 
//     private void addReloadListener(final AddReloadListenerEvent event)
//     {
//         event.addListener((stage, resourceManager, preparationsProfiler, reloadProfiler, backgroundExecutor, gameExecutor) ->
//                 CompletableFuture.runAsync(() -> proxy.onResourceManagerReload()));
//     }
// 
//     public void onConfigChange(final ModConfigEvent event)
//     {
//         if (event.getConfig().getModId().equals(Tails.MOD_ID)) 
//         {
//             Config.loadConfig();
//         }
//     }
// 
//     public static void setLocalOutfit(final Outfit outfit)
//     {
//         Config.localOutfit.set(outfit);
//         Config.configuration.save();
//     }
// }


import com.google.common.base.Strings;
import com.google.gson.JsonSyntaxException;
import net.minecraft.network.PacketBuffer;
import net.minecraftforge.fml.network.NetworkDirection;
import net.minecraftforge.fml.network.PacketDistributor;
import net.minecraftforge.fml.network.NetworkEvent.Context;
import uk.kihira.tails.client.outfit.Outfit;
import uk.kihira.tails.common.Tails;
import java.util.UUID;
import java.util.function.Supplier;
package uk.kihira.tails.common.network;



public final class PlayerDataMessage 
{
    private UUID uuid;
    private Outfit outfit;
    private boolean shouldRemove;

    public PlayerDataMessage() {}
    public PlayerDataMessage(UUID uuid, Outfit outfit, boolean shouldRemove)
    {
        this.uuid = uuid;
        this.outfit = outfit;
        this.shouldRemove = shouldRemove;
    }

    public PlayerDataMessage(PacketBuffer buf) 
    {
        this.uuid = buf.readUniqueId();
        String tailInfoJson = buf.readString();
        if (!Strings.isNullOrEmpty(tailInfoJson)) 
        {
            try 
            {
// Path: src/main/java/uk/kihira/tails/client/outfit/Outfit.java
// public final class Outfit
// {
//     public final UUID id;
//     public String name;
//     public String description;
//     public ArrayList<OutfitPart> parts;
// 
//     public Outfit()
//     {
//         id = UUID.randomUUID();
//         parts = new ArrayList<>();
//     }
// 
//     // todo make a client only multimap of mountpoint <-> outfitpart?
// }
// 
// Path: src/main/java/uk/kihira/tails/common/Tails.java
// @Mod(Tails.MOD_ID)
// public class Tails 
// {
//     public static final String MOD_ID = "tails";
//     public static final Logger LOGGER = LogManager.getLogger(MOD_ID);
//     public static final Gson GSON = new GsonBuilder().create();
//     public static final boolean DEBUG = true;
// 
//     public static boolean hasRemote;
// 
//     public static CommonProxy proxy = DistExecutor.safeRunForDist(() -> ClientProxy::new, () -> CommonProxy::new);
// 
//     public Tails()
//     {
//         FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
//         FMLJavaModLoadingContext.get().getModEventBus().addListener(this::onConfigChange);
//         MinecraftForge.EVENT_BUS.addListener(this::addReloadListener);
//     }
// 
//     private void setup(final FMLCommonSetupEvent event)
//     {
//         proxy.preInit();
//         Config.loadConfig();
// 
//         PartRegistry.loadAllPartsFromResources();
//     }
// 
//     private void addReloadListener(final AddReloadListenerEvent event)
//     {
//         event.addListener((stage, resourceManager, preparationsProfiler, reloadProfiler, backgroundExecutor, gameExecutor) ->
//                 CompletableFuture.runAsync(() -> proxy.onResourceManagerReload()));
//     }
// 
//     public void onConfigChange(final ModConfigEvent event)
//     {
//         if (event.getConfig().getModId().equals(Tails.MOD_ID)) 
//         {
//             Config.loadConfig();
//         }
//     }
// 
//     public static void setLocalOutfit(final Outfit outfit)
//     {
//         Config.localOutfit.set(outfit);
//         Config.configuration.save();
//     }
// }


// Path: src/main/java/uk/kihira/tails/common/network/PlayerDataMessage.java
import com.google.common.base.Strings;
import com.google.gson.JsonSyntaxException;
import net.minecraft.network.PacketBuffer;
import net.minecraftforge.fml.network.NetworkDirection;
import net.minecraftforge.fml.network.PacketDistributor;
import net.minecraftforge.fml.network.NetworkEvent.Context;
import uk.kihira.tails.client.outfit.Outfit;
import uk.kihira.tails.common.Tails;
import java.util.UUID;
import java.util.function.Supplier;

package uk.kihira.tails.common.network;



public final class PlayerDataMessage 
{
    private UUID uuid;
    private Outfit outfit;
    private boolean shouldRemove;

    public PlayerDataMessage() {}
    public PlayerDataMessage(UUID uuid, Outfit outfit, boolean shouldRemove)
    {
        this.uuid = uuid;
        this.outfit = outfit;
        this.shouldRemove = shouldRemove;
    }

    public PlayerDataMessage(PacketBuffer buf) 
    {
        this.uuid = buf.readUniqueId();
        String tailInfoJson = buf.readString();
        if (!Strings.isNullOrEmpty(tailInfoJson)) 
        {
            try 
            {
                this.outfit = Tails.GSON.fromJson(tailInfoJson, Outfit.class);