Fix build

This commit is contained in:
Sollace 2022-06-24 16:46:55 +02:00
parent 19938313dd
commit 6e63a4df72

View file

@ -20,11 +20,11 @@ public class TextureFlattener {
@Override
public void load(ResourceManager resManager) throws IOException {
NativeImage image = TextureData.load(resManager, textures.get(0)).getImage();
NativeImage image = NativeImage.read(resManager.getResourceOrThrow(textures.get(0)).getInputStream());
for (int i = 1; i < textures.size(); i++) {
try (TextureData data = TextureData.load(resManager, textures.get(i))) {
copyOver(data.getImage(), image);
try (NativeImage data = NativeImage.read(resManager.getResourceOrThrow(textures.get(i)).getInputStream())) {
copyOver(data, image);
}
}