2018-09-13 12:03:28 -04:00
|
|
|
package noppes.npcs.client;
|
|
|
|
|
|
2023-01-12 21:33:06 -05:00
|
|
|
import cpw.mods.fml.common.network.internal.FMLProxyPacket;
|
2018-09-13 12:03:28 -04:00
|
|
|
import io.netty.buffer.ByteBuf;
|
|
|
|
|
import io.netty.buffer.Unpooled;
|
2023-01-12 15:07:45 -06:00
|
|
|
import noppes.npcs.AnimationDataShared;
|
2018-09-13 12:03:28 -04:00
|
|
|
import noppes.npcs.CustomNpcs;
|
|
|
|
|
import noppes.npcs.Server;
|
2022-05-27 14:32:24 -05:00
|
|
|
import noppes.npcs.client.gui.OverlayQuestTracking;
|
2022-01-30 04:05:01 -06:00
|
|
|
import noppes.npcs.client.gui.customoverlay.OverlayCustom;
|
2018-09-13 12:03:28 -04:00
|
|
|
import noppes.npcs.constants.EnumPacketServer;
|
2022-05-23 20:47:32 -05:00
|
|
|
import noppes.npcs.controllers.data.SkinOverlay;
|
2018-09-13 12:03:28 -04:00
|
|
|
|
2023-01-12 21:33:06 -05:00
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.UUID;
|
|
|
|
|
|
2018-09-13 12:03:28 -04:00
|
|
|
public class Client {
|
2022-05-27 14:32:24 -05:00
|
|
|
public static OverlayQuestTracking questTrackingOverlay = null;
|
2022-01-30 04:05:01 -06:00
|
|
|
public static HashMap<Integer, OverlayCustom> customOverlays = new HashMap<>();
|
2022-05-23 20:47:32 -05:00
|
|
|
public static HashMap<UUID, HashMap<Integer, SkinOverlay>> skinOverlays = new HashMap<>();
|
2023-01-12 15:07:45 -06:00
|
|
|
public static HashMap<UUID, AnimationDataShared> playerModelData = new HashMap<>();
|
2018-09-13 12:03:28 -04:00
|
|
|
|
|
|
|
|
public static void sendData(EnumPacketServer enu, Object... obs) {
|
|
|
|
|
ByteBuf buffer = Unpooled.buffer();
|
|
|
|
|
try {
|
|
|
|
|
if(!Server.fillBuffer(buffer, enu, obs))
|
|
|
|
|
return;
|
|
|
|
|
CustomNpcs.Channel.sendToServer(new FMLProxyPacket(buffer, "CustomNPCs"));
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|