Skip to content

Commit aab355b

Browse files
committed
Add more versatile logging for when source texture fails to parse
1 parent 4f5f8c1 commit aab355b

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/main/java/btw/lowercase/optiboxes/skybox/SkyboxParser.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,9 @@ private SkyboxParser() {
191191

192192
try {
193193
textureId = Identifier.fromNamespaceAndPath(namespace, path);
194-
} catch (IdentifierException ignored) {
194+
} catch (IdentifierException exception) {
195195
LOGGER.error("Failed to read texture path '{}:{}' as resource location", namespace, path);
196+
exception.printStackTrace();
196197
return null;
197198
}
198199

src/main/java/btw/lowercase/optiboxes/skybox/SkyboxResourceHelper.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class SkyboxResourceHelper implements
1515
net.minecraft.server.packs.resources.PreparableReloadListener
1616
//? } else {
1717
/*net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener
18-
*///? }
18+
*///? }
1919
{
2020
private ResourceManager resourceManager;
2121

@@ -33,11 +33,11 @@ public class SkyboxResourceHelper implements
3333
@NotNull Executor gameExecutor
3434
) {
3535
this.resourceManager =
36-
//? >=1.21.9 {
37-
sharedState.resourceManager();
38-
//?} else {
39-
/*resourceManager;
40-
*///?}
36+
//? >=1.21.9 {
37+
sharedState.resourceManager();
38+
//?} else {
39+
/*resourceManager;
40+
*///?}
4141
return CompletableFuture.runAsync(() -> {
4242
SkyboxManager.INSTANCE.clearSkyboxes();
4343
if (OptiBoxesClient.getConfig().enabled.isEnabled()) {
@@ -61,7 +61,8 @@ public Stream<Identifier> searchIn(String parent) {
6161
public InputStream getInputStream(Identifier resourceLocation) {
6262
try {
6363
return this.resourceManager.getResource(resourceLocation).orElseThrow().open();
64-
} catch (Exception ignored) {
64+
} catch (Exception exception) {
65+
exception.printStackTrace();
6566
return null;
6667
}
6768
}

0 commit comments

Comments
 (0)