alRex-U / alRex-U/ParCool

IllegalArgumentException: No model for layer minecraft:player_slim#parcool.equipment_in

Open
#505 3 comments 0 reactions 0 assignees View on GitHub
bug question
Dominant language
Java
Stars
131
Forks
62
Avg merge
1d 2h
Merged PRs (30d)
2

Description

**ParCool version:** 4.0.0.2 (also reproduced with `ParCool-CompatibilityAddon` removed — happens with base ParCool alone)
**Minecraft:** 1.21.1, NeoForge 21.1.248
**Modpack context:** Large pack (~300 mods), including several other mods that also mixin into `PlayerRenderer`'s constructor (`entity_model_features`, `entity_texture_features`, `skinlayers3d`, `waveycapes`, `quickskin`, `grapplemod`, `create`, `tacztweaks`, `railways`, `do_a_barrel_roll`, `playeranimator`, `hammerlib`)

### Crash

```
java.lang.IllegalArgumentException: Failed to create player model for SLIM
at net.minecraft.client.renderer.entity.EntityRenderers.lambda$createPlayerRenderers$27(EntityRenderers.java:183)
...
Caused by: java.lang.IllegalArgumentException: No model for layer minecraft:player_slim#parcool.equipment_in
at net.minecraft.client.model.geom.EntityModelSet.bakeLayer(EntityModelSet.java:17)
at net.minecraft.client.renderer.entity.EntityRendererProvider$Context.bakeLayer(EntityRendererProvider.java:63)
at net.minecraft.client.renderer.entity.player.PlayerRenderer.handler$icg000$parcool$onInit(PlayerRenderer.java:5035)
at net.minecraft.client.renderer.entity.player.PlayerRenderer.(PlayerRenderer.java:67)
...
```

### What's happening

ParCool's `PlayerRendererMixin` bakes a `parcool.equipment_in` layer in its `onInit` hook during `PlayerRenderer` construction, but only for the regular (`player`) model — no corresponding `player_slim` layer definition was registered before the bake call, so constructing the slim-arm player renderer throws and crashes the whole client on startup.

### Reproducibility note

This isn't 100% consistent across mod combinations — in our testing, adding or removing an unrelated mod (one that never touches rendering) sometimes made the crash appear/disappear. Our best guess is that this is because ParCool's `onInit` mixin implicitly depends on state set up by one of the many *other* mods that also inject into `PlayerRenderer`'s constructor, and the apply order between them (determined by mod/mixin-config discovery order) shifts based on what else is installed.

If that's right, the real fix is registering the `player_slim` variant of the `equipment_in` layer alongside the regular one (or via the standard `RegisterLayerDefinitions`-style event) rather than relying on construction-time ordering relative to other mods' mixins — that would make it deterministic regardless of load order or what else is installed.

### To reproduce

Install ParCool 4.0.0.2 on 1.21.1/NeoForge with a player skin using the slim (Alex) arm model, alongside other mods that also inject into `PlayerRenderer`'s constructor (see mod list above). The crash occurs during initial resource load, before reaching the main menu.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.