#change held item position of player client-only model

4 messages · Page 1 of 1 (latest)

wise mossBOT
#
Conflicting tags detected

It looks like you have applied tags to this post that conflict. Please only apply the tags that are relevant to your post. We can only help you if we know the context of your question, and applying incorrect tags makes this confusing.

You can refer to #1029468016594911232 for a description of what each tag is for!

Welcome to the help forum!

Please make sure to read #1029468016594911232 as it may answer your question!

Once your question has been resolved, please mark the post as closed by using the </close:1163944441741049897> command.

desert basin
#
  1. Set Up Two Geometries

In your entity.json, define two geometries:

  • "geo.local_model" – The bunny model (no held item expected)
  • "geo.dummy_model" – A hidden version with correct item bone (vanilla-based, invisible body but working hand bone)
  1. Conditionally Switch Based on query.is_local_player

In your animations or geometry file:

"geometry": "query.is_local_player ? 'geo.local_model' : 'geo.dummy_model'"

BUT... Minecraft doesn’t actually allow query.is_local_player in geometry selectors, so instead:

🔁 Use Two Render Controllers:

In render_controllers.json:

"controller.render.custom_player": {
  "geometry": "controller.geoswitch",
  "materials": [ "material.default" ],
  "textures": {
    "*": "textures/entity/bunny"
  }
}

In the component groups or animation controllers, use this logic:

"animation_controllers": {
  "controller.player_mode_switch": {
    "states": {
      "default": {
        "transitions": [
          {
            "is_local": "query.is_local_player"
          }
        ]
      },
      "is_local": {
        "on_entry": ["/geometry geo.local_model"]
      },
      "not_local": {
        "on_entry": ["/geometry geo.dummy_model"]
      }
    }
  }
}
  1. Hide the Dummy Model

In geo.dummy_model:

  • Set all bones to size 0 or hidden
  • Keep only the "right_arm" bone with correct transforms
  • Minecraft will render the item at this bone's position
  1. Fake a Held Item

If your visual model needs the item to appear in a different hand pose, you can:

  • Add a bone to your geo.local_model named hand_item
  • Attach a custom model of a pickaxe in your resource pack to that bone
  • Sync its animation with the actual held item (just for show)
#

@rotund dawn

rotund dawn
#

ooh
I did already get the correct models to show using just entity.json (in the render controllers section of the player entity.json, I added render controllers for whether the player is the local player), however if I hide the vanilla third person model, the item renders in a placeholder animation, so that has to be there
so if both are shown, how can I make an animation only play for one of these models?
I think this is the last roadblock for getting the result I want