Skip to content

[Bug] Confusing error message for improperly formatted biome tags in biome extrusion #554

@Neohedron512

Description

@Neohedron512

Pre-Issue Checklist

  • [ x] I have checked that I am on the latest version of Terra.
  • [x ] I have searched the github issue tracker for similar issues, including
    closed ones.
  • [x ] I have made sure that this is not a bug with another mod or plugin, and it
    is Terra that is causing the issue.
  • [x ] I have checked that this is an issue with Terra and not an issue with the
    pack I am using.
  • [x ] I have attached a copy of the latest.log file
  • [ x] I have filled out and provided all the appropriate information.

Environment

Name Value
Terra Version 6.5.0-BETA
Platform / Platform Version Fabric
Any External Plugins or Mods occurs with all other mods omitted.
Terra Packs In Use Overworld, custom
Terra Addons In Use biome-provider-pipeline: "2.+" biome-provider-single: "1.+" biome-provider-image: "1.+" biome-provider-extrusion: "1.+" chunk-generator-noise-3d: "1.+" config-biome: "1.+" config-flora: "1.+" config-noise-function: "1.+" config-ore: "1.+" config-palette: "1.+" config-distributors: "1.+" config-locators: "1.+" config-feature: "1.+" structure-terrascript-loader: "1.+" structure-sponge-loader: "1.+" language-yaml: "1.+" generation-stage-feature: "1.+" structure-function-check-noise-3d: "1.+" palette-block-shortcut: "1.+" structure-block-shortcut: "1.+" terrascript-function-sampler: "1.+"

Issue Description

you get an OOB exception instead of something more clear when entering an improperly formatted biome tag string to the from: argument in a biome extrusion.

Steps to reproduce

in pack.yml:biomes.extrusions, write an extrusion for a single biome, where the from: argument in the replacement is just the name of the biome.

Expected behavior

if the biome tag is improperly formatted for single biome replacements, an error should tell you how it should be written

Actual behavior

You are given a java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 12 error instead of something informative, like: "single biome replacements should be written as 'BIOME:your_biome_id'"

Full stacktrace

Exception Stacktrace
java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 12
    at com.dfsek.terra.addons.biome.query.impl.BiomeTagHolder.get(BiomeTagHolder.java:20) ~[?:?] {}
    at com.dfsek.terra.addons.biome.query.impl.SingleTagQuery.test(SingleTagQuery.java:29) ~[?:?] {}
    at com.dfsek.terra.addons.biome.query.impl.SingleTagQuery.test(SingleTagQuery.java:9) ~[?:?] {}
    at com.dfsek.terra.addons.biome.extrusion.extrusions.ReplaceExtrusion.extrude(ReplaceExtrusion.java:37) ~[?:?] {}
    at com.dfsek.terra.addons.biome.extrusion.BiomeExtrusionProvider.extrude(BiomeExtrusionProvider.java:37) ~[?:?] {}
    at com.dfsek.terra.addons.biome.extrusion.BiomeExtrusionProvider.getBiome(BiomeExtrusionProvider.java:32) ~[?:?] {}

Additional details

The docs are also a bit confusing, as this necessary bit of formatting isn't mentioned anywhere, they only tell you from: expects a value of type string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Note: Good First IssueGood for anyone looking to learn the internals of TerraPlatform: AllIssue/PR is applicable to all platforms.Status: AcceptedIssue/PR is accepted.Type: BugSomething isn't working as intended.Type: DocumentationImprovements or additions to documentation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions