How to make a ranged item sword weapon work correctly

Started by FanelLore on

Topic category: Help with Minecraft modding (Java Edition)

Active 3 years ago
Joined Feb 2020
Points:
909

User statistics:

  • Modifications: 1
  • Forum topics: 15
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 404
How to make a ranged item sword weapon work correctly

So recently I've been doing some stuff with a ranged item that is actually a sword, but can shoot a projectile/particles. 

However, when I test it in the test environment, it looks as if I am holding the blade of the sword rather than the handle. Is there a way to fix this by offsetting it or do I need to make a 3d model in blockbench/other software?

 

 

Active 3 years ago
Joined Nov 2019
Points:
867

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 387
there's 2 ways you can do…
Tue, 06/09/2020 - 01:14

there's 2 ways you can do this. the easy way is to "Edit code of selected mod element", when you click the button, select the second file from the drop down list, in the file you will see some editable numbers, find "thirdperson_righthand"::... and then "translation":.... i think its the Y offset you need to change (the 2nd number in the set of 3). mess around with those numbers until you get it right.

the better way is make your own json block model for the sword using blockbench. by using blockbench you can visually edit the model display position/size/rotation. import the json model and texture into mcreator and in your item's 1st page "Item 3d model" dropdown choose your imported model

Active 4 months ago
Joined Jun 2019
Points:
2787

User statistics:

  • Modifications: 4
  • Forum topics: 48
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 3716
blockbench's display tab…
Tue, 06/09/2020 - 01:51

blockbench's display tab could edit how your model displays in the GUI and in hand.

 

Active 3 years ago
Joined Feb 2020
Points:
909

User statistics:

  • Modifications: 1
  • Forum topics: 15
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 404
Alright then. That will help…
Tue, 06/09/2020 - 02:49

Alright then. That will help a lot. thanks!