From 892553838bec0cdabc9b1ba18571c944acc7c709 Mon Sep 17 00:00:00 2001 From: Sollace Date: Thu, 26 Jul 2018 17:00:56 +0200 Subject: [PATCH] Fix error due to cross thread shenanigans --- .../com/voxelmodpack/hdskins/PreviewTextureManager.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/hdskins/java/com/voxelmodpack/hdskins/PreviewTextureManager.java b/src/hdskins/java/com/voxelmodpack/hdskins/PreviewTextureManager.java index 06edfcf3..bd9ca732 100644 --- a/src/hdskins/java/com/voxelmodpack/hdskins/PreviewTextureManager.java +++ b/src/hdskins/java/com/voxelmodpack/hdskins/PreviewTextureManager.java @@ -56,7 +56,12 @@ public class PreviewTextureManager { PreviewTexture skinTexture = new PreviewTexture(texture, def, buffer); - Minecraft.getMinecraft().getTextureManager().loadTexture(location, skinTexture); + Minecraft mc = Minecraft.getMinecraft(); + + mc.addScheduledTask(() -> { + mc.getTextureManager().loadTexture(location, skinTexture); + }); + return skinTexture; }