fix(validation): reduce log spam + add OOM guard + check correct mesh for WEIGHTS_0

- DataDrivenItemParser: downgrade animation_bones absence log from INFO to
  DEBUG (was spamming for every item without the optional field)
- GlbValidator: read 12-byte GLB header first and reject files declaring
  totalLength > 50 MB before allocating (prevents OOM on malformed GLBs)
- GlbValidator: WEIGHTS_0 check now uses the same mesh selection logic as
  GlbParser (prefer "Item", fallback to last non-Player) instead of
  blindly checking the first mesh
This commit is contained in:
NotEvil
2026-04-17 02:12:47 +02:00
parent 3f6e04edb0
commit 9dfd2d1724
3 changed files with 88 additions and 36 deletions

View File

@@ -267,7 +267,7 @@ public final class DataDrivenItemParser {
if (!root.has("animation_bones")) {
// Not an error — absent means "permissive" (all owned bones, all animations)
animationBones = null;
LOGGER.info(
LOGGER.debug(
"[DataDrivenItems] {}: animation_bones not declared — all owned bones enabled for all animations",
fileId
);