StringIndexOutOfBoundsException in TextureConverter when converting Farmer's Delight
# Describe the bug
When running the latest CI builds of Hydraulic and Geyser on a Fabric 1.21.1 server, the server throws a `StringIndexOutOfBoundsException` during the pack conversion process for the mod "Farmer's Delight Refabricated".
This error seems to originate from `TextureConverter.java:115`, causing the texture conversion to fail for this mod. Consequently, Bedrock players see "Update Blocks" (question marks/dirt blocks) instead of the mod items.
# Environment
Minecraft Version: 1.21.1 (Fabric)
Platform: Fabric Loader 0.18.4
Geyser Version: 2.9.2-SNAPSHOT (git-DEV-6b7ec05)
Hydraulic Version: 14300de
Farmer's Delight Version: farmersdelight 1.21.11-3.4.6+refabricated
# To Reproduce
1. Install Fabric Server (Minecraft 1.21.1).
2. Install Geyser-Fabric (Build #6b7ec05) and Hydraulic (Latest CI).
3. Install "Farmer's Delight Refabricated" (version 1.21.11-3.4.6+refabricated).
4. Start the server.
5. Observe the error in the console during the Hydraulic conversion phase.
# Expected behavior
Hydraulic should correctly convert the textures or gracefully handle path parsing errors without crashing the conversion thread.
# Server Log / Stack Trace
```text
[Hydraulic Conversion Thread #2/ERROR]: Failed to convert asset
java.lang.StringIndexOutOfBoundsException: Range [0, -1) out of bounds for length 10
at java.base/jdk.internal.util.Preconditions$1.apply(Unknown Source)
at java.base/jdk.internal.util.Preconditions$1.apply(Unknown Source)
at java.base/jdk.internal.util.Preconditions$4.apply(Unknown Source)
at java.base/jdk.internal.util.Preconditions$4.apply(Unknown Source)
at java.base/jdk.internal.util.Preconditions.outOfBounds(Unknown Source)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckFromToIndex(Unknown Source)
at java.base/jdk.internal.util.Preconditions.checkFromToIndex(Unknown Source)
at java.base/java.lang.String.checkBoundsBeginEnd(Unknown Source)
at java.base/java.lang.String.substring(Unknown Source)
at knot//org.geysermc.pack.converter.type.texture.TextureConverter.convert(TextureConverter.java:115)
at knot//org.geysermc.pack.converter.type.texture.TextureConverter.convert(TextureConverter.java:64)
at knot//org.geysermc.pack.converter.pipeline.ConverterPipeline.convert(ConverterPipeline.java:70)
at knot//org.geysermc.pack.converter.pipeline.ConverterPipeline.lambda$convert$3(ConverterPipeline.java:90)
# Additional Context
I also noticed an API mismatch error in the logs, which might be related to the bleeding edge builds:
java.lang.NoClassDefFoundError: org/geysermc/geyser/api/item/custom/v2/component/java/ItemDataComponents
0 条评论