Merge branch 'mc/1.13' into mc/1.12

This commit is contained in:
Blue (Lukas Rieger) 2020-04-09 20:13:17 +02:00
commit 7bcb43fce6
2 changed files with 6 additions and 4 deletions

View File

@ -15,3 +15,7 @@ jobs:
run: ./gradlew test
- name: Build with Gradle
run: ./gradlew build
- uses: actions/upload-artifact@v2-preview
with:
name: artifact
path: build/release/*

View File

@ -24,7 +24,6 @@
*/
package de.bluecolored.bluemap.core.resourcepack;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.File;
@ -199,9 +198,8 @@ public synchronized Texture loadTexture(FileAccess fileAccess, String path) thro
//crop off animation frames
if (image.getHeight() > image.getWidth()){
BufferedImage cropped = new BufferedImage(image.getWidth(), image.getWidth(), BufferedImage.TYPE_INT_ARGB);
Graphics2D g = cropped.createGraphics();
g.drawImage(image, 0, 0, null);
BufferedImage cropped = new BufferedImage(image.getWidth(), image.getWidth(), image.getType());
image.copyData(cropped.getRaster());
image = cropped;
}