
[1.21.1] ModelHandler item model gathering can cause a crash/freeze
Closed this issue ยท 1 comments
the ModelHandler parse only item models here
, but doesn't account for other models being in the given setthat function get's all models, not just item model.
without other mods this is fine by accident, since the block prefix models/block
is one character longer than models/item
when other mods have models not in block/item though this can cause a index out of bounds exception when trying to remove the prefix with fileToId
example that causes issues is a vivecraft model that is just models/bag.json
, which throws this error
Range [12, 10) out of bounds for length 15
to fix this you should first filter the set you get to only contain item models, then map them.