Pitan76 / item-alchemy

https://www.curseforge.com/minecraft/mc-mods/item-alchemy-fabric
20 stars 7 forks source link

[Bug] Items like enchantments and potions shouldn't have EMC or should store nbt #64

Open OffsetMonkey538 opened 1 year ago

OffsetMonkey538 commented 1 year ago

When you put an enchantment book or potion into the Alchemy Table, they don't keep NBT so they turn into no-effect versions.
Enchantment Book without enchantments Potion without enchantments aka Uncraftable potion

I'm not sure how ProjectE dealt with this, so we should probably check that, but here are the options:

mymai1208 commented 1 year ago

I think keeping NBT should be unregistrable because it would be unbalanced by replicating items in storage mods (sorry bad english)

OffsetMonkey538 commented 1 year ago

Hmm yeah that makes sense, I'm gonna install ProjectE and see how it deals with this

OffsetMonkey538 commented 1 year ago

Ok ProjectE seems to have the same bug with enchantments, but it does store potions separately and has different EMC values for different potions

OffsetMonkey538 commented 1 year ago

Hmm what if we make an exception to potions and enchant books and store their nbt? Hmm what about items with enchantments? This would also probably need quite a few changes of how the mod works

OffsetMonkey538 commented 1 year ago

Then we'd get to the question of how much EMC different potions and enchanta should have. What about modded potions and enchants? Would those just have a default value that maybe scales with the enchant level?

mymai1208 commented 1 year ago

Hmmm, that would be difficult because it would be unbalanced depending on the effect of the enchantment.

BananaPuppy commented 1 year ago

@OffsetMonkey538 modded enchantments should just default to unobtainable through EMC unless specified through the api by the mod, as is the current behavior with vanilla enchantments ie: item with modded enchantment goes into Alchemy Table -> Alchemy Table stores non-enchanted item

BananaPuppy commented 1 year ago

although this would be quite a bit more complicated to implement, and slightly unrelated. the api could also allow for custom nbt behavior for the EMC value. edit: this would make it easier to implement custom behavior for other nbt based items such as tipped arrows, and any future nbt behavior implemented by mojang.

OffsetMonkey538 commented 1 year ago

This makes most sense to me: Instead of just storimg the item ID, we store an item stack as NBT instead. We could default to stripping the stack of everything other than the id and make exceptions for enchantment books, potions, tipped arrows, etc and also allow that to be done by other mods via the api.

I might slowly start working on this at some point so I guess I'll assign this to myself. If you have any more suggestions or objections, feel free to put them here.