[1.18.2+] add a way to register IBullets with a custom item, for more addon possibilities
dkmk100 opened this issue ยท 2 comments
Explain your idea
Currently IBullets need to use IE's bullet item class exclusively. My request is to make is to that the BulletHandler's register method allows you to include an item supplier, which will be used instead of the default IE bullet item class
The point of this would be to allow for custom bullet behavior before it was fired, specifically to modify data on it through interactions and stuff.
The way the system is currently set up, bullets can really only be modified in specific external ways like a new machine, or a crafting recipe, since they need an outside force to modify their NBT. Allowing for custom items would allow them to have custom behavior when hitting things, for example.
My use case is that I'm trying to make spell bullets to work with Ars Nouveau, but Ars Nouveau's spell scribing table only allows for writing spells on an item with a specific interface, which would require me to have a custom item class that does that. As it stands, this requires me to extend the non-API BulletItem class which is dangerous and not great for my addon.
Another possible use case would be allowing a bullet to absorb essence from a mob you punch with it, maybe a summoning bullet or something?
It would also allow, if for some reason it was necessary, a bullet that can be used as a weapon in the main hand, a bullet with custom tick behavior, and a bullet that interacts with energy storage things when in inventory.
That last one could actually be useful for any addon trying to add a charged bullet I think.
And I just realized that a bullet used as both a melee weapon and a bullet would make sense for a tranquilizer dart or similar.
Let me know if I'm dumb and if any of this can be done without a custom item