diff --git a/src/main/java/com/minelittlepony/api/events/Channel.java b/src/main/java/com/minelittlepony/api/events/Channel.java index ce1ac4b8..95289480 100644 --- a/src/main/java/com/minelittlepony/api/events/Channel.java +++ b/src/main/java/com/minelittlepony/api/events/Channel.java @@ -13,7 +13,6 @@ import net.minecraft.util.Identifier; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import com.minelittlepony.api.pony.Pony; import com.minelittlepony.api.pony.PonyData; @Environment(EnvType.CLIENT) @@ -37,14 +36,7 @@ public class Channel { ClientPlayNetworking.registerGlobalReceiver(REQUEST_PONY_DATA, (client, handler, ignored, sender) -> { registered = true; - if (client.player != null) { - Pony pony = Pony.getManager().getPony(client.player); - LOGGER.info("Server has just consented"); - - sender.sendPacket(CLIENT_PONY_DATA, MsgPonyData.write(pony.metadata(), PacketByteBufs.create())); - } else { - LOGGER.info("Server has just consented but the client player was not set"); - } + LOGGER.info("Server has just consented"); }); ServerPlayNetworking.registerGlobalReceiver(CLIENT_PONY_DATA, (server, player, ignore, buffer, ignore2) -> { PonyData packet = MsgPonyData.read(buffer); diff --git a/src/main/java/com/minelittlepony/client/util/render/NativeUtil.java b/src/main/java/com/minelittlepony/client/util/render/NativeUtil.java index 2de10b02..5ec669e4 100644 --- a/src/main/java/com/minelittlepony/client/util/render/NativeUtil.java +++ b/src/main/java/com/minelittlepony/client/util/render/NativeUtil.java @@ -88,16 +88,17 @@ public class NativeUtil { } public static void parseImage(Identifier resource, Consumer consumer, Consumer fail) { - parseImage(resource, consumer, fail, 0); - } - - private static void parseImage(Identifier resource, Consumer consumer, Consumer fail, int attempt) { - try { + MinecraftClient.getInstance().execute(() -> { if (!RenderSystem.isOnRenderThread()) { - RenderSystem.recordRenderCall(() -> parseImage(resource, consumer, fail, attempt)); + RenderSystem.recordRenderCall(() -> _parseImage(resource, consumer, fail, 0)); return; } + _parseImage(resource, consumer, fail, 0); + }); + } + private static void _parseImage(Identifier resource, Consumer consumer, Consumer fail, int attempt) { + try { MinecraftClient mc = MinecraftClient.getInstance(); TextureManager textures = mc.getTextureManager();