XP Obelisk

XP Obelisk

4M Downloads

Parity with Kibe's XP Liquid

DegaZZZ opened this issue · 5 comments

commented

XP Obelisk's Liquid cannot be put into XP Shower which is really sad. Some kind of converter between these two liquids would be really appreciated. Maybe there is some kind of convention that can be used towards XP Liquids?

commented

I understand your issue, but I'm not sure if my knowledge is enough to takkle this problem atm.
One of the points of the XP Obelisk is that you don't have to use the slow XP Shower to get lvl's or repair your mending equip.

commented

Hi!
D4rk (the Kibe author) and me (Spectrum) talked about a coordiated XP storage thing yesterday, using an unified fluid and Fabric APIs Storage api as Storage (for items and block entities). Would this be something you are interested in?

It would be a small mod that XP Obelisk, Kibe and Spectrum can include via jar-in-jar, having a singular XP fluid with unified conversion rate and a way to query and transfer stored XP in items and blocks.

commented

Hi.

A coordinated system sounds awesome.
I would love to learn more about this.

The jar in jar is new for me. How would this work? Do all three mods contain this Code snipped/jar then?

Greetings

commented

Currently collecting all the things that mods like yours require to have a good overview what the previous list still lacks to be usable for all these mods. Anything else that comes to mind that yours would need?
As soon as I got a good feel what each mod requires I'll write up the draft, create a short demo, follect feedback & finish the thing.

To answer your questions:

It would be a tiny mod containg:

  • XP fluid
  • A way to represent XP stored in item form
  • a small config for things like how much 1 Bucket of XP should be worth

For how to use it:

  • You'd include that compat library mod in your build.gradle similarly how you include fabric api already. (modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}")
  • For ease of the players each of the mods using that unified api would be able to "jar in jar" this XP storage mo. This means your mod.jar (which is basically a zip file in the first place) will contain that small utility mod as one of it's contents, so users don't have to download it separately (using the include keyword: modImplementation include "xxx.yyy.unifiedxp:${project.unified_xp_version}")
  • Instead of referencing ModFluids.XPFLUID you would point to that compat mods fluid instead UnifiedXPFluids.XPFUID. For Querying XP <=> Fluid conversion ratio there would be UnifiedXP.MB_PER_XP instead of your current XpStorage.MB_PER_XP. Everything else stays pretty much the same code, wise. You just point XP Obelisk to the same fluid & conversion ratios that Kibe & Co. would also use
  • "XP stored in item form" may be interesting for the XP berries, allowing other mods to recognise the berries as a form of "solid xp", allowing them to convert those to liquid xp or use them in their own crafting recipes that require XP. For simplicity, imagine it kind of like Fabric APIs Fluid Storage API, just more simple.

For more in-depth discussion also feel free to hit me up in the Fabric-, Spectrum- or the All of Fabric Discord if you use that. In that case I'd open a small group with us and D4rk.

EDIT:
If you prefer, I'd also volunteer to create a PR with all the necessary changes when the compat mod is done. Probably just a dozen line change or so. :)

commented

That sounds awesome! I'm totally in.

The only thing that comes to my mind about missing something is for my additions mod for the item inserter. Some sort of experience Item list that contains modded items like the xp Bucket, create solid exp, my xp berries and other solid exp or the vanilla experience bottle's and their corresponding mb/exp value. I don't know if that's even possible.

I want to try to implement it by my self, but if I fail I would love to use your PR ☺️

thank you for all your efforts!