how do i create a projectile without creating a ranged item?

Started by no-one_ on Mon, 12/26/2022 - 21:26

Topic category: Advanced modding

Last seen on 01:23, 23. Jan 2023
Joined Sep 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
how do i create a projectile without creating a ranged item?
Mon, 12/26/2022 - 21:26

I need an entity with the projectile triggers, but I don't want to fill my mod with ranged items that aren't supposed to be there, I know I can take them out of the creative tab, but I think that would look very strange in a mod like JEI and in many other situations, so how do I create just the projectile? like, remove the part of the code that creates the ranged item or something like that

(I had already made a similar post on common moding, but as I imagine it involves custom code and I didn't have any useful answers there, I thought I'd better post it here)

Last seen on 02:41, 28. Mar 2023
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
You could probably lock theā€¦
Mon, 01/02/2023 - 16:46

You could probably lock the code and delete the section devoted to the ranged item. (Might result in compilation errors though.) You could also make a custom entity for your projectile instead, (though this would probably be more difficult). Or, you could try making the projectile/ranged item, locking the sections devoted to the projectile, and copying them into a custom mod element. Usually, I just make it so the Ranged item doesn't appear in the creative inventory, but this probably won't work for JEI.