great work trying to conquer this, item swapping in figura is lots of fun!
what you're likely missing is the indicator that tells minecraft where to demonstrate an item should be displayed, so its defaulting to an arbitrary space. you will need to create a "group" (also referred to as a bone) called "LeftItemPivot" and "RightItemPivot" under your Arm folders that acts as the indicator of where the items should be displayed in game. this should work out of the box with no additional scripting required.
so.. the folder structure should be something like..
root
>Body
>Head
>LeftArm
>>LeftItemPivot
>RightArm
>>RightItemPivot
>LeftLeg
>RightLeg
(if youre not using "root" folder that's okay, but it makes life way easier later on dealing with animations and such.)
Once you make the "RightArmPivot" group, move the Pivot Point location to be specifically in your avatar's hand.
Other helpful Pivot points I use frequently are..
HelmetPivot (where to position your helmet)
LeftSpyglassPivot (where on your face the spyglass goes to)
RightSpyglassPivot (where on your face the spyglass goes to)
ChestplatePivot (where to position your chest armor)
LeftParrotPivot (where to place parrots who sit on your left shoulder)
RightParrotPivot (where to place parrots who sit on your right shoulder)
LeftLeggingPivot (where to position your left leg armor)
LeftBootPivot (where to position your left leg boot)
RightLeggingPivot (where to position your right leg armor)
RightBootPivot (where to position your right boot)
note, naming conventions must be as above, if they are in lower case only it may not work. also there are lots of other pivot points you can use for all sorts of stuff (https://figura-wiki.pages.dev/enums/ModelPartParentTypes#pivot-types), these are just some i use frequently.
If after setting up the pivots, the item is still not positioned properly, you will need to manually move it around the space in blockbench until it syncs up with where you'd like it to display. Usually i will create a second bbmodel called Items.bbmodel, and define that in my script as follows:
function events.item_render(item)
if item.id == "minecraft:lantern" then
return models.Items.Lantern
end
end
hope this helps you or any future figura adventurer : )
cheers