Traveler's Backpack

Traveler's Backpack

26M Downloads

Fluid-item relationship recipes to allow for user-managed compatibility with all modded fluid items

floral-qua-floral opened this issue ยท 2 comments

commented

A massive variety of mods add items for storing fluids in items, such as the countless Bottled Milk mods, or the Inspirations mod which adds bottles of liquid dye, or any mod that adds thirst and with it flasks of water/purified water. I feel like keeping up with all these mods manually would be excessive amounts of work, and it could potentially force you to prioritize more popular mods which could leave smaller mods with fluid items left behind.

A potential solution would be to implement a fluid-item "recipes" system that allows modpack creators to define custom item-fluid relationships for the traveler's backpack's fluid slots, that would allow recipes to be defined consisting of:

  • Relevant fluid
  • Input item
  • Output item
  • Fluid change amount

So, for example, if someone wanted to add compatibility for a generic flask of water:
Recipe 1:

  • Relevant fluid: minecraft:water
  • Input item: mod:filled_flask
  • Output item: mod:empty_flask
  • Fluid change amount: 125 mB

Recipe 2:

  • Relevant fluid: minecraft:water
  • Input item: mod:empty_flask
  • Output item: mod:filled_flask
  • Fluid change amount: -125 mB

This would allow filling or emptying the mod's flask item into the tanks to withdraw or deposit water.

This could probably be handled through either this mod's config or through CraftTweaker support. Regardless of how it's implemented, pack creators could set up compatibility for the mods they're using rather than having to hope compatibility will be patched into the main mod, which could take a long time and would divert your attention away from more meaningful development. If such a system would be possible, I think it would be an excellent addition that would make this mod so much more versatile with regards to how it can interact with other mods.

commented

Hi all.
This is something Forge itself implements if I'm not mistaken. Is the fluid dictionary still a thing?

Also, the fluid-effect registry can be expanded to add fluid effects for mods, so different things can happen when you drink different liquids from the backpack, even allowing fluids that can't be drank originally to be drunk.

Drink, drank, drunk english is hard.

Anyway, this isn't something the mod itself should do, because Forge sregisters empty/filled containers for fluids.

commented

while using the fluid library is a good idea also allowing custom recipes would be an interesting gameplay mechanic for pack creators, such as maybe the backpack cpuld auto filter water for tough as nails or maybe it could get water out of leaves. jsut my 2 cents