mirror of
https://github.com/GeyserMC/PackConverter.git
synced 2026-01-04 15:31:36 +00:00
Fix the converter empty check being done after other expensive operations
This commit is contained in:
@@ -260,6 +260,10 @@ public final class PackConverter {
|
||||
throw new NullPointerException("Vanilla Pack Path cannot be null");
|
||||
}
|
||||
|
||||
if (this.converters.isEmpty()) {
|
||||
throw new IllegalStateException("No converters have been added");
|
||||
}
|
||||
|
||||
// Load any image plugins
|
||||
ImageIO.scanForPlugins();
|
||||
|
||||
@@ -271,10 +275,6 @@ public final class PackConverter {
|
||||
ZipUtils.openFileSystem(this.input, this.compressed, input -> {
|
||||
this.tmpDir = this.output.toAbsolutePath().getParent().resolve(this.output.getFileName() + "_mcpack/");
|
||||
|
||||
if (this.converters.isEmpty()) {
|
||||
throw new IllegalStateException("No converters have been added");
|
||||
}
|
||||
|
||||
ResourcePack javaResourcePack = this.compressed ? MinecraftResourcePackReader.minecraft().readFromZipFile(this.input) : MinecraftResourcePackReader.minecraft().read(NioDirectoryFileTreeReader.read(this.input));
|
||||
ResourcePack vanillaResourcePack = MinecraftResourcePackReader.minecraft().readFromZipFile(vanillaPackPath);
|
||||
BedrockResourcePack bedrockResourcePack = new BedrockResourcePack(this.tmpDir);
|
||||
@@ -325,9 +325,9 @@ public final class PackConverter {
|
||||
this.logListener.info("Packaging pack...");
|
||||
|
||||
this.packageHandler.pack(this, this.tmpDir, this.output, this.logListener);
|
||||
this.cleanup();
|
||||
this.logListener.info("Packaged pack! Cleaning up...");
|
||||
|
||||
this.logListener.info("Packaged pack!");
|
||||
this.cleanup();
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -140,11 +140,6 @@ public class FontTransformer implements TextureTransformer {
|
||||
int desX = position % 16;
|
||||
int desY = position / 16;
|
||||
|
||||
if (fontData.character == 'ʏ') {
|
||||
context.info(String.valueOf(desX));
|
||||
context.info(String.valueOf(desY));
|
||||
}
|
||||
|
||||
g.drawImage(
|
||||
ImageUtil.scale(
|
||||
ImageUtil.crop(
|
||||
|
||||
Reference in New Issue
Block a user