Arrow In The Knee Remastered
"I used to be an adventurer like you, then I took an arrow in the knee..."
Now every mob in Minecraft can share that experience!
Features
Arrows on all living entities. Every mob shows the arrows stuck in its body, not only players.
Arrow type is kept. A spectral arrow stays a spectral arrow, a tipped arrow keeps its tipped texture and colour, and arrows added by other mods are drawn with their own renderer, model and texture, as long as they extend AbstractArrow and call super.onHitEntity.
Custom textures for any arrow type through a resource pack. See below.
Works with modded entities. Any ModelPart-based model can take an arrow.
Players keep the vanilla arrow placement, but now with the right arrow type.
Custom arrow textures. Resource packs
Add assets/aitk/stuck_arrow_textures.json to any resource pack. Keys are arrow entity ids, values are textures drawn on the vanilla arrow model, using the same layout as textures/entity/projectiles/arrow.png.
{
"minecraft:arrow": "mypack:textures/entity/my_arrow.png",
"minecraft:spectral_arrow": "mypack:textures/entity/my_spectral_arrow.png",
"somemod:fire_arrow": "mypack:textures/entity/fire_arrow.png"
}
Entries replace the arrow's own renderer for stuck arrows only. Higher priority packs win. Reload with F3 + T.
Client and Server Behavior
Client only
-Arrows still follow the model. Following the model is pure client-side rendering and doesn't depend on the server.
-Every frame, the layer reads the current animated pose of each part, so an arrow stuck in an arm moves and rotates with that arm. Arrows in the head turn with the head.
-On hierarchical models (villagers, creepers, etc.), the parent parts' transforms are applied too, so an arrow in a child part follows its parent.
-The arrow count is a vanilla synced value, so the client always knows how many arrows to draw and where. Only the arrow type is missing, so they all look like normal arrows.
Server only
-A player without the mod sees vanilla behavior: arrows only on players, and nothing is drawn on mobs.
-So there are no arrows on mobs to follow anything.
-A player who has the mod on their client gets the full "both" experience, because the server already sends the arrow types.
Both client and server
-Arrows follow the model exactly as described above, on all living entities.
-Each arrow also keeps its type: spectral, tipped, or an arrow from another mod drawn with its own renderer.
-Resource pack textures from stuck_arrow_textures.json work for every arrow type.
-Players keep the vanilla placement and follow their model as usual, now with the correct arrow type.
Limits (all cases)
-Only ModelPart-based models work. Mod entities using GeckoLib or Azurelib have no ModelParts, so they get no arrows.
-On non-hierarchical models (humanoids, quadrupeds), parts are found by scanning the model's fields. A very unusual model from another mod could end up with undetected parts.
License
MIT License. Originally created by RazorPlay01.