mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-15 23:25:32 +01:00
Merge branch 'mc/1.13' into mc/1.12
This commit is contained in:
commit
7bcb43fce6
4
.github/workflows/gradle.yml
vendored
4
.github/workflows/gradle.yml
vendored
@ -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/*
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user