how do I make a spear act like a trident?

Started by Elip1 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how do I make a spear act like a trident?

I have been trying to make a spear that you throw put I can't get it to leave my infintory and stick in the ground like a trident.  could someone please help me with this?

Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
At the first, to make the…
Thu, 03/31/2022 - 21:21

At the first, to make the spear, have you seen this video? https://youtu.be/8bwVzvJJbxA, and for sticking into the ground i don't know...https://mcreator.net/tracker/issue/65955 can't normally be done, but you can find some way to position the spear/item whit a function triggered when block get's hit (for now ain't found nothing)

Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you!
Tue, 04/05/2022 - 20:32

Thank you!

Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I know I'm late, but for…
Mon, 07/29/2024 - 13:16

I know I'm late, but for anyone seeing this now, there is a solution:
Lock the element code of the projectile;
Remove the @Override that says when InGround, discard
Add instead:
    @Override
        protected ItemStack getPickupItem() {
            return new ItemStack(YourModNameModItems.spearitemname.get());
    }

P.S.: Credit: I kinda stole this from How to Make Custom Arrows (TUTORIAL).
P.P.S.: Also for some reason you cannot pick up the item, it gives you air. Maybe I did something wrong. I'm working on this.