mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 08:14:23 +01:00
Can't call this from a background thread, only the main one.
This commit is contained in:
parent
0138938da3
commit
75f60a0185
1 changed files with 3 additions and 0 deletions
|
@ -100,6 +100,9 @@ public class Pony implements IPony {
|
|||
MinecraftClient mc = MinecraftClient.getInstance();
|
||||
TextureManager textures = mc.getTextureManager();
|
||||
|
||||
if (!mc.isOnThread()) {
|
||||
throw new RuntimeException("This can only be called from the main thread.");
|
||||
}
|
||||
// recreate NativeImage from the GL matrix
|
||||
textures.bindTexture(resource);
|
||||
|
||||
|
|
Loading…
Reference in a new issue