#Fluid Unit Hell
1 messages · Page 3 of 1
but yeah, if someone for some reason wanted to make sticks meltable theyd be a different amount than a normal rod
and nobody ever questioned it during migration
and nobody questioned it for several years? I quite honestly find that hard to believe
nobody questions anything
there's too many things to sift through, lol
We have decade old things that nobody has ever revisited
having to deal with decisions people made 10 years ago is tough
Like we still have events from 1.2 that have no javadocs 
okay then let's forget bricks
Actually stop everyone
let's do quartz vs. diamonds instead because that will be a recurring issue
Bricks is not in ingot tag in 1.21. Who is saying that
Nobody
we just went over that xd
boop
Well historically, forge just shat out tags for whatever they feel like
I said it was, but I was wrong - I was remembering from before the tag rework
Nonetheless™️ - think at the medium here
Item conventions are defined at the tag level
Legacy to reduce chances of people breaking when porting. These Backport stuff will be removed in 1.22
Perhaps relegate fluids to the same
i.e. introduce c:fluids/molten_metal and bind fluid volumes strictly for that type of fluid
except we'd have a trillion different tags for a trillion slightly different use cases because we have to deal with stack sizes
its not going to help, itll just make things more complicated
and harder to change in the future
You can't implement a system against a suggestion, but you can implement one against a standard
You can set a standard volume for molten metal fluid quantities
and make systems that operate on molten metals
but that leads to the same problem
^
what do we do for quartz and diamonds
Nobody gets special molten metals™️
both are gems, I think we can all agree on that
but they have different block -> item conversions
what is FluidUnits.ONE_GEM gonna be?
250 or 100? or 90?
if you really wanted to, we could have a default data map that covers some basic use cases. but these would, again, not be required to use and a dev should still be given the power to choose a different amount for their units
yeah, providing defaults here is absolutely reasonable
ye
yes
scrims in mojang
They can’t be converted back btw
prismarine is both™️
should we define gems vs crystals now 
mods generally ignore that
farmer's delight
we're gonna end up with a million different tags for a million different standards, its not necessary
and we also have a similar situation for glowstone and redstone
oh truuuuueee
and for the different mods that add gunpowder blocks
Eh you basically just need STORAGE_3x3 and STORAGE_2x2
which funnily enough, also can't agree on whether to make it a 2x2 or a 3x3 recipe

is gunpowder a liquid 
is this really want you want shadows
is this really "better"
I mean, fair enough, but that could really just be any other item
is it simpler? i dont really see this as simpler in any way
enter Avaritia
oh god avaritia
wait, what is even being discussed right now? i thought it was just custom fluid units
I think you're missing some parts of a point, codex. Everything claiming it is an ingot should be the same fixed value
What is this about. Defining conversion rate of items to blocks for fluids to follow? If so, wasn’t the point of the fluid gui be that it doesn’t need to be standard as each mod would show their own fluid’s rates in ui
yes
We don't need to magically define every permutation of "things that might be"
that's precisely the point
correct
but an ingot is an ingot - we know what that is, and we have a rigid definition of it
you do
except thats whats going to happen if you set it so things need to be global. because even within vanilla these things are not consistent
Shadow, stop scope creeping lol
if you say everyone knows how much fluid an ingot is (or is supposed to be), then I will heavily argue against that
Adding standards to when this should just be a display thing? That sounds like expanding scope
shadows is trying to not have this implemented, instead we're gonna get a 100 line long fluid tag class with a 400 line long fluid constants class
at that point is it even a standard
(Codex: I see you slowly drifting off into toxicity, please try to avoid that)
They probably don't, because everyone is so damn inconsistent with it
yes exactly
We have the ability to just fix that value
but you don't solve existing inconsistency by pressing a standard onto everyone
because not everyone will follow
So restrict mod’s creative freedom to having a 4x4 ingot block of their own material?
something something xkcd 927
I do not want restrictions to mod’s ideas
then it isn't an ingot 
why not
no, we really dont. we've given a ton of different examples of why these values cannot be consistently standardized without simply alienating those who deviate from the standard in even the most minor of ways
It can be a thick ingot
(responding to this)
Well the block can't be a storage_blocks/
says who
I don't want to imagine what kind of mess would occur if someone made a 2x2 storage block
Things that create and transform from ingot->storage block operate on the 9:1 ratio
glowstone?
Honey block would’ve been in storage blocks if the reverse recipe didn’t need a glass bottle
glowstone isn't a storage block
i dont want to have to deal with recipes for 12 different kinds of ingots, 12 different kinds of storage blocks. this doesnt really simplify the system in any way, it just makes it more complicated. Your argument is trying to say that it would add complexity to introduce dynamic amounts for units, but adding and accounting for so many different standards is just as or even more complex
Shadow, to be clear, the entire point of storage blocks tag folder was for blocks crafted from only one resource type and has a mirror reverse recipe
question: how would dynamic units work in pipes? would there just a be a FluidAmount class that has a list of fluid units and amounts?
So 2x2 and 5x5 can be storage blocks if the recipes are mirrored both ways
5x5 
im not sure what you mean, no one transfers in measures other than millibuckets
Up to the the implementation, really.
You can have a transfer rate of 1 ingot/s, or 100mB/s
or both
Javadoc for storage blocks if anyone was wonder. Is same in fabric https://github.com/neoforged/NeoForge/blob/a91eb52f1e2a31bf285dbe007b6f594615e8538e/src/main/java/net/neoforged/neoforge/common/Tags.java#L561
1 ingot/s if the ingot unit is defined on the fluid, and 100 mB/s otherwise
You didn’t catch it so passed lol
or you max() them
Perhaps I'm too old™️
The rules of the oredictionary were more strict than that tag definition
really, your call as a pipe implementer to make
transfer really isnt part of this discussion, it really wouldnt affect it in any way
but yeah, ^
well it won't affect the API but it will affect how people are expected to implement transfer
so the units will just be multiples of millibuckets?
As it currently stands, yes
which is funny because then the 4x4 "ingot" is not possible anyway
Not in the current setup, no
in the new one, yes
don't you see how many layers of hopium there are
ditto, the alternative doesnt really sound all that attractive to me
I suppose you don't value simplicity as much as I do
I do
i dont really see it as simple tho
the simple rule is "if your fluid doesn't fit the standard that's too bad"
same as "your mod needs more than simulations"
that rule already doesn't work
see: 1 molten quartz v 1 molten diamond
isnt the point of the mod loader to create and improve cross mod compatibility. what would be the point
what's the problem now? quartz can easily be 250 mb or some other arbitrary value
diamond should probably be 90 mb?
correct
well they're both Gem as a unit
yet both are one gem
so Gem as a unit can't both be 90 and 250
correct
so we've established that a Gem is not a unit to put in the constants API
unless we do GEM_4 and GEM_9
I mean you could just call quartz and amethyst a Crystal (which is 250)
if i wanted to truly create a tank that holds 1 ingot of any fluid, id need to go through every single standard and check what fluid is being inserted to dynamically set the limit based on which ingot standard im accepting. this is not simpler than just fluid.getUnitAmount("ingot")
do you mind elaborating on that constants API you're talking about?
I don’t think there should be any constant. Just bottle with javadoc to say non-water bottles
because that seems to actively work against this
it's the trivial solution
And bucket constant too
trivial is not necessarily good
except its really not that trivial. i mean, its trivial on neos end, but not on the dev using neo
I say that's an irrelevant use case tbh. Make it 90 mb if you really want to.
-_-
I had this exact type of discussion for the transfer API 4 years ago
"we need <use case that doesn't exist> so we MUST have the more complicated API"
is anyone actually out there making ingots that don't fit the player expectation of what an ingot is?
except that melting quartz and diamonds into fluids are both valid usecases
like im trying to not get upset but like, i feel like this is an entirely reasonable thing to want to do and the solution being presented by the neo maintainers is just "well yeah, you cant do that, tough shit i guess"
and the valid answer is: 250 mb and 90 mb
Okay so we call those different things™️
quartz is not a Gem if Diamond/Emerald/Lapis are a Gem
™️
except that quartz is a gem, by tag standards
which you seem so keen on using (which I understand)
no, that's a shard 
if we can assume c:ingots to have 9:1 conversations to blocks, then we should also be able to assume that for c:gems, right?
well, here's your problem
but it doesn't really matter; mods that choose non-equivalent "gems" will conflict and that's FINE
we cannot
it is not
you'll have this exact problem with recipes
as a player, this is incredibly frustrating
one mod has a 4x c:gems/xxx and one has a 9x c:gems/xxx recipe to a block
you're fucked anyway
item recipes do not need to assume sizes because there are no sizes
but we can make a system that isnt that much more complicated that fixes all of these problems, i dont understand why you wouldnt at least consider it :/
I mean yeah, probably. I think if I were to revisit that I would classify quartz as different from diamond/emerald due to that
just read my example
your example is literally not related to fluids in any way
that is precisely my point
I don't see how that is a point relevant to the discussion at hand
it shows how pointless it is to find a solution in terms of fluid amounts, when the same issue exists for items already
this wouldnt be a problem. if both fluids work in units of "blocks" you can simply have your ingredient require a blocks worth of liquid
if multiple mods don't agree on what a gem is, you will already have a problem with your item recipes
but there is no issue for items because items don't have amounts
there is nothing to solve with a complicated fluid amount system
seriously? did you even read my example??
Say the per-fluid-display-magic thing is implemented - what happens if you have two fluids in a shared tag that have different volume definitions?
that sounds like a mess
I did, and it's quite frankly useless
that shows me that you didn't even understand the argument
shadows ^
but only with blocks, right? aren't literally every other unit pointless then?
wdym?
That's a different question
then explain it differently
haven't we just moved the goalposts from being defined based on blocks instead of mB?
I'm asking about conflict resolution between tag-level definitions and fluid-level definitions
I really want to understand your point, but as it stands, I don't
you specify "1 ingot of #c:molten_iron" in your recipe
no problem
mod A: has a a:topaz_gem tagged as c:gems/topaz, and a recipe to create 4 c:gems/topaz to a topaz_block
mod B: has a b:topaz_gem tagged as c:gems/topaz, and a recipe to create 9 c:gems/topaz to a topaz_block
do you see how you can turn your 1 block of topaz into 2.25 blocks of topaz?
where is the part where this relates to fluids
ah that's what you mean
ok yeah that is an issue
however not as much as fluids are
by far not
your recipe would turn 1 block of topaz into 1 block's worth of liquid. then another recipe would accept 1 gems worth of liquid to return 1 gem item. the same liquid is used, this is not an issue because the fluid defines the ratios
and that is because fluids mostly reuse vanilla materials
like, I can think of at least 4 different mods that add molten iron
while I can think of exactly two that add topazes (and both of those I think use 9:1)
it is fundamentally the same issue
two items (topaz gems and topaz gems) having the same tag, but different quantities
which is fine because you dont need to account for specific amounts or ratios at all
be my guest to extend this discussion to items
but that is the one case here where I will argue a non-issue
what is this? item recipes have no knowledge about fluid amounts
we're talking about fluids here, it has to be converted to a fluid at some point for your argument to make any sense
their point is that duping is possible anyway with two identically-tagged materials, one with 9:1 and one with 4:1 conversion
which is correct, but doesn't make this system any less valid
This seems fine from a technical perspective. When we get into player expectations of how two fluids that should be the same behave I think it might have problems. This is mostly why I don't want to have the granularity be at the individual fluid level, or at least the individual fluid level should adhere to a tag-level bound
The expectations bleed into transfer and storage though
but realistically two people implementing molten iron will probably not randomly decide to use different representations
I mean, feel free to specify 90mB for c:molten_metals
but you will run into issues for c:molten_gems
you'd think, but Gregtech (I think Gregtech?) would beg to differ
the issue of "the player expects two semantically identically fluids to behave the same" leads us to the milk fluid
which is just bad
GT has (iirc) mini dusts, which are 2x2 of a dust (which is 1:1 with ingots)
So they need all manner of weird factorization
well that's just 144
I think™️
so not really any manner of weird factorization, just the same classic™️ ingot value
but why should that stop people from using Gregtech molten iron in a Tinkers smeltery
{
"input": "1x topaz block",
// result
"fluid": "c:topaz",
"amount": { "block": 1 }
}
Mod A has a 2x2 recipe and returns 1000 mb with each gem being 250 mb
Mod B has a 3x3 recipe and returns 900 mb with each gem being 100 mb
{
"input" : {
"fluid": "c:topaz",
"amount": { "gem": 1 }
},
"result": "1 x topaz gem"
}
Mod A's 1000 mb of fluid gets consumed to return 4 gems because each gem is worth 250 mb, no dupe has ocurred
Mod B's 900 mb of fluid gets consumed to return 9 gems because each gem is worth 100, no dupe has occurred
except that most other mods (e.g. tinkers) use 90 for ingots
well why did tcon move to 90?
I know it used to be 144
its not like its any cleaner against the bucket value
I don't know
but that's really not important
the important part is that these different standards already exist
Anyway, a player should be able to understand how much a tank holds in terms of the definition for that fluid, right?
correct
i.e. a player knows how many ingots of X fit in a tank
correct
now if the definition of that is inconsistent, they don't really get to know that
how so
it might hold N ingots of a:molten_iron on 90mB/ingot but only K ingots of b:molten_iron on 144mB/ingot
This might be particularly relevant with a smeltery
So the solution to all our woes is to merge my PR !
a smeltery can just hold ingots instead of mBs just as well
... why
no, please do not do this
this will not solve anything
Well, in theory yes, but that's not how our fluid containers operate atm
if anything itll cause more issues, let us discuss the solution we've been actually talking about for the last few days :/
So we have to address that as well
making a PR like this, over the heads of the ones actually proposing the system (because they will be the ones using it), will not solve anything
the best way to counter a proposal is to make a counter-proposal
then let's do that
Which means we do need to couple with fluid containers instead of acting like containment/transfer is separate
except your counter-proposal is outright horrible
and, to reiterate, will not solve the problem at hand
have respect for the solution that has been working for 10 years 😛
"working" is an overstatement
you mean the same "working" that has had capabilities "working" for several years?
or that had the damage pipeline "working" for several years?
we're not going to throw everything out and start over; reworks are always a tradeoff
the point of neo is to look over decisions made a decade ago and consider better solutions that would benefit modders. this is not that
that is not what we are doing
currently, yes
this PR can change that though
it has limited conversion to fluids
I mean yeah idk if GT minidusts are meltable
and a limited amount of tiny dusts
tiny dusts™️ can be 10 mb
the question is: what is the amount for a small dust™️?
understatement of the century
MI had small dusts for some time until I realized that they were pointless
even tiny dusts are kept to a minimum...
Tech, it honestly surprises me that you're so against this, because I'd absolutely expect you to make use of this system if available
most of my fluids have no connection to items
was there a PR for the proposal? or just for the counter-proposal?
design doc for the original, and the PR itself is WIP iirc
I'm not sure I'm understanding how this is supposed to work
knightminer hasnt had time to start it. if he doesnt start by the time i finish the thing im working on ill start on a PR for this
A set of "fluid volume types" is established, and the actual mB volume of those types is delegated to individual fluids
I'm oversimplifying a bit
but that's the short form™️
Does everything need a mB mapping for every type of thing 
a 1x #c:gems/topaz -> <gem> x a:molten_topaz recipe is broken for b:topaz_gem as an input
Do I need to be able to reference 1 ingot of liquid experience
how do you get the logical unit
the same way you get a tool action, its just a string
without knowing you're moving experience in particular around, I mean
Well, okay, but how do you know if a fluid needs to support a unit type, and what happens if you request an invalid unit type for a fluid?
Fluid A can define that one gem is worth 250 mB of fluid A. Fluid B can define that one gem is worth 100 mB of fluid B.
Users are able to have a tank that stores 100 molten gems, regardless of how many mB that would actually be. Similarly, recipes can request one gem of molten fluid A (particularly relevant for two mods adding the same molten fluid, but with different mB amounts per ingot/gem/etc). And of course, display can also use this.
how does the author of fluid experience know they need to supply what set of volumes
(and which ones they don't need to supply)
They don't need to supply any set of volumes.
how does the c:gems/xxx -> Fluid A recipe work if you pass a B gem?
then how do you write a recipe if you don't have a known volume of a particular fluid?
Just so we're clear.
Gem A converts into, say, 250 mB of molten gem A.
Gem B converts into 100 mB of molten gem B.
Both gem A and gem B are tagged as c:gems/something.
Is that what your example is?
yes
boop
this is an item input in a melting recipe
yes, anything else isnt really relevant
{
"type": "example:my_melting",
"input": {
// item tag
"tag": "c:gems/something"
}
"output": {
"fluid": "example:my_fluid",
"amount": { "gem": 1 }
}
}
This is easily implementable by resolving the tag to an item before trying to query how much fluid one gem is for that ingredient
what happens when they're items is not relevant. because you could dupe with this in item form anyways. you craft 4 gems into 1 block, uncraft the block and get 9 of the other gem, now you have 9 when you started with 4. the system is flawed to begin with, the fluids would be flawed by extension
my point exactly! a resource can't have both 1/4th and 1/9th gems under the same "gem" name since it breaks the system!
except it can
resolving the tag to an item before trying to query how much fluid one gem is for that ingredient
the proposal doesn't have any item <-> fluid amount link yet as far as I know
it breaks the system either way, so considering this case is irrelevant
but it's the case that you use as an argument for why this system needs to exist in the first place...
if item recipes are broken, fluid recipes will be broken as well
but we would like to have non-broken and interchangeably-useable fluid recipes for non-broken and interchangeably-useable item recipes
wait wait wait, no, this system does not break even with this stuff. the system stays strong maintaining the ratios set by the fluid author, they cannot then be converted to cause a dupe
the dupe happens when they are in item form
thats another issue entirely
the goal is to avoid dupes entirely
if you can't avoid dupes anyway then your system is goddamn useless
the dupe happens soley when they are in item form
that is not the goal here, no
Avoiding dupes entirely ends up being a modpack author's burden though
if you want to avoid dupes, be my guest, but then this is the wrong discussion
a resource system is either sound or not sound
there is no "oh but it's half correct trust me it's good"
if you don't handle the item case, your system is unsound
if you want to extend the scope of this to apply to items as well this would actually solve this issue as well 
this part of the resource system is "sound", in that regard though
correct, but that is not the problem we are trying to solve here
then you're not solving anything
wrong
you can, at which point the system will become so complex that it will get shot down anyway
we are solving the issue of 144 mB of Molten Iron (Gregtech) being not comparable to 90 mB of Molten Iron (Tinkers)
it was mostly a joke, this is overkill for items
that is the original intention of this entire discussion
Tinkers' moves back to 144mB ingots, like they used to, and everything is fine?
but the situation where itd dupe as an item is really a horrible example. This system does not seek to solve dupe issues created by conflicting recipes. Its trying to establish different materials adhering to a similar standard without rigidly defining what said standard is
so the constants are the simpler solution for the same effect?
except that there is probably a reason they moved there to begin with
the reason they used 144mB was because they should fit 9x into one bucket, to mirror block form. I don't know what reason they chose to change it
hm...
another thing to think about
fluid unification and/or things that attempt to translate fluid to fluid might be weird
I don't really know how those operate under the hood
so what "weird" means is arbitrary
you mean like tinkers alloying?
afaik they just unify the resource, they shouldnt be touching the amount field
so they'll be fine
No that would be even more problematic
see
If you just converted 1000mB of a:iron to b:iron with different ingot volumes
if the amount field is defined with the string map itll be fine
you can convert 1 ingot of iron a to 1 ingot of iron b

doesn't it? I don't understand what this is trying to solve then, with the variable units
maybe you should bring up a list of problems before thinking too muhc of solutions 😛
as soon as two units are defined on both, you can convert without issues
its 1 instance of a million of fluids being inconsistent across the board, it doesnt solve the issue as a whole
as long as they are not (or there is not enough to convert one), then you don't convert
the simple solution to inconsistency is standardisation, i.e. constants
so in what way is this variable system actually better than constants?
because there are too many edge cases, you would have to define dozens of constants to properly account for common modded and vanilla behavior. most of those being just small variations of the same things
it also just restricts devs to only being able to define their content in those specific set of rigid standards
(that is not explicitly a bad thing)
i see it as a bad thing
I don't really understand the point of defining things relative to nothing
I want to remind you of xkcd 927
wdym relative to nothing
which will be an issue here
what point is there to allow a fluid to assign 5 different units of differeing size if the only one ever programmatically interacted with is ingot?
thats not the case tho?
the units only have meaning when they're equivalent to something else, is what I mean
like, I can see no reason to not allow fluids to define their tooltips as saying "ingot" per 10mB or whatever, but as soon as we start using those units in recipes we're dredging up a whole lot of nasty
I mean I still don't really think different ingots should have different volumes
regardless of if you can make it work at a technical level
yeah but you believe that because you think "ingots" should be rigidly defined
i dont want to deal with 12 standards of ingots just to make my mod compatible with all things that are "ingots"
currently every thing that is not in the definition of a standard ingot is ignored, because the system is not flexible enough to allow devs who need to do things slightly differently to express their differences.
we can and should change that
this is not really different from tag conflicts... you have to talk to the other modders and/or get a standard implemented in neo if that doesn't work out
except we cant get everthing to fit a standard, or if we do we have to establish multiples that we have to take into account
my opinion is that we should pick a standard that covers 90% of the use cases
indeed; that's why we limit the scope to 90% 😄
you know what i meant
I know exactly what you mean. And this is exactly the discussion I had 4 years ago on simulations vs transactions
simulations are the 90% solution
the reality is that the 10% will need to make adjustements in other places to fit the standard, or accept that they are left out of the standard entirely
except introducing fluid units is not nearly the same amount of burden as transactions, so lets just implement them..
this is really not as hard as you guys are making it out to be
its a datamap and a getter on the fluid
I agree, but what is currently out there disagrees. And ingots are already quite standardized, bringing up the good ol' gems here.
transactions are a single helper that you need to subclass
there is a lot of additional complexity that is not immediately visible
that require you to completely rewrite how your storage is implemented. this does not require that same level of burden
and ultimately the edge cases that transactions cover are alot more niche than the cases that fluid units cover
(that claim I'd not support)
and idk why you're making this argument anyways, if you could you would implement transactions because you know they're better
Well there you are right with your second sentence; my real problem is that this proposed system doesn't solve many of the issues it claims to solve. Modders will still have to agree on which fraction of a block 1 gem is.
i mean, i guess but that wasnt a problem we were trying to solve
that is the entire point
aiui, fluids just define both, which can be anything
they have to agree, else they can turn 1 block of topaz into 2.25 blocks of topaz
That is already an issue with items, thus irrelevant to discuss in the context of fluids
this proposed system doesn't solve many of the issues it claims to solve
you claim to solve it but you don't; it's still a problem
different materials being "ingots" and defining ingots differently. the same ingot of 2 different mods is a unification issue which is not relevant to this discussion
this is not an issue it claims to solve
this does not solve unification of the same material across different mods. it solves unification of the term "ingot" of different materials across all mods
has it solved anything then?
if 1 mod defines an ingot of say "obsidian" as 1/4th and another mod defines an ingot of obsidian as 1/9th, you have the same issue again
correct
where you can turn 1 obsidian into 2.25 obsidian
AAAAAA
but that, again, is not what this PR is trying to solve
calm boop
it doesn't unify "obsidian ingot", how can you claim that it unifies "ingot" lol
^
these are not the same
thank you, much better wording
I just do not understand how it solves anything, sorry, but I do not get it. It is however getting late, so I guess I'll try again tomorrow 
just like in real life, you have miles and (nautic) miles. which are two different units, named the same, used in two different contexts
(yes I know bad because imperial system, but that's beside the point)
ping me when you're available tomorrow, and I will explain it to you again
i think i might try and write up a gist about its use case in non display applications tonight, hopefully itll help a bit
@astral stag do you have something you can link me for how you currently consume liquids when you execute the consumption of one in a recipe?
the only one who ever did that is tinkers' Construct for the record. Everyone else just does buckets. We are breaking something no one uses except me, who is willing to use this system
is it not? its on the list to consider for liquids for tinkers
diamond is 100mb, not 90. (which you'd know if you read the proposal in the pins)
gunpowder's definitely not a liquid, but there's at least an argument that powders are fluids [tinkers currently has powdered snow as a fluid, apparently] and we're not mekanism
its 100x cleaner. 100 nuggets is a bucket. 144 has no logical unit thats a bucket.
hmm, that's another benefit of this system
a modpack that adds a mod that adds diamond nuggets (or "shards" or whatever) can change it to 90 without patching the mod
[re obsidian, for the record, given there are multiple mods that have 1/4 obsidian dusts, i'd be somewhat surprised at a mod that had 1/9 ingots]
ultimately tinkers has good reasons for wanting them to be divisible by 9 and terrafirmacraft has good reasons for wanting them to be divisible by 100
For the record, its partly I don't have time to start it, partly I want some consensus on whether we want a unit API or just a tooltip API. I'll probably toss together a design doc on a tooltip API to pin alongside the more complex unit API, see what people think about both alternatives. I do highly suspect its going to be the same complexity level for both though, so we might as well just do unit API
you use a fallback or you don't support it. Fallbacks are trivial, and they are proposed in the pinned design doc.
Absolutely not happening
and that solves nothing
just changings who is on which standard, not the standard people use
Overall, I'm not against doing standard fluid values, I just don't see any point including those values in Neo. The upside is they are simple, but they are useless to the player without a unit display API
I do like the idea of letting mods define their own standard without losing compatibility, which would be trivial except in the purely hypothetical cases people keep bringing up (but what if you want half an ingot). The cases people actually use can easily just make capacities relative to a given standard
Here is a proposal for purely fluid tooltips, no fluid unit API: https://gist.github.com/KnightMiner/651e3e018e5bde3b61156f0b128f9201
I will note, this proposal is identical impact on the modders side, except they lose the option to define capacities and recipes in terms of the units defined for their tooltips. The other proposal those were optional capabilities
In both proposals, its just a datamap Neo adds which lets mods define lists of units for a fluid
data map with the unit API proposal:
{
"values": {
"#tconstruct:fluid_units/metal": [
{ "name": "c:block", "value": 810 },
{ "name": "c:ingot", "value": 90 },
{ "name": "c:nugget", "value": 10 },
{ "name": "tconstruct:copper_can", "value": 90, "show_in_tooltips": false }
],
"#tconstruct:fluid_units/gem": [
{ "name": "c:block", "value": 900 },
{ "name": "c:gem", "value": 100 },
{ "name": "tconstruct:copper_can", "value": 100, "show_in_tooltips": false }
]
}
}
data map with the unit tooltip proposal:
{
"values": {
"#tconstruct:fluid_units/metal": [
{ "translation_key": "fluid_unit.tconstruct.block", "value": 810 },
{ "translation_key": "fluid_unit.tconstruct.ingot", "value": 90 },
{ "translation_key": "fluid_unit.tconstruct.nugget", "value": 10 }
],
"#tconstruct:fluid_units/gem": [
{ "translation_key": "fluid_unit.tconstruct.block", "value": 900 },
{ "translation_key": "fluid_unit.tconstruct.gem", "value": 100 }
]
}
}
why a list and not a map
if its purely for display the units should be global. that said, i dont think its really worth doing purely global values
a map from translation keys to values sounds gross
I disagree. Purely global values are just going to cause conflicts in mods
as opposed to a list of pairs that is essentially a map?
the string being a translation key will be super bulky
well if they are purely for display mods cant set their own standard. so they should be global. but like i said, i dont want this to be global
if it's purely for display we can have the map contain "gem", provide translations for common types in "fluid_unit.gem", and let mods add an extra dotted namespace if they want.
{
"fluid_unit.tconstruct.block": 810,
"fluid_unit.tconstruct.ingot": 90,
"fluid_unit.tconstruct.nugget": 10,
}
plus we lose the readiblity that is a transltaion key
though the format is arbitrary, not worth bikeshedding over imo
[though at that point we might as well make it a resloc and use "c:gem" so that if we do add something else in the future it won't require changes]
as long as it can b e defined
why is it a translation key and not just "block" or "c:block"
yeah, we could just use simple names and define a standard translation key format
because the only usage of this name is to construct a translation key, might as well be direct
lets me use an existing key from elsewhere in my mod instead of defining something new
it could be a shorter string, sure. No objection either way
so
just means neo forces a particular format on the key that is used in exactly 1 spot
but also it should probably just be a list of strings, the values arent needed here if they are defined globally
you would
i am concerned that, in particular if this is a datamap rather than a special json loader that only runs on the client, mods may attempt to introspect it and use it for other api use cases anyway.
in which case now we just have a worse fluid unit api
if I do it in code, then me registering ingot and you registering ingot with different values will cause a crash
so now I am forced to define tconstruct:ingot and codex:ingot
i mean
and since they are now different, what is the point defining them in code? just define them in the one place they are used
they could be completely valueless, a system like tool actions
but if they are valueless, we now have no way to dispaly them in tooltips
or we just have the other proposal
i.e. they only have a string and nothing else, from which the translation key is generated
i prefer the other proposal 
whats the point then?
these have no logical use in code
they are just a list of display name and unit values
they construct display in tooltips, nothing else
that is fair. This one is mostly for people complaining the other is too complicated
I think most people will agree that unit display is important
i am not entirely convinced that being translation keys will actually stop mods from misusing them for other stuff
and the fact that unit display is either the same effort or just a worse API might help argue towards unit API
that is true. If they were client side only that might stop mods though
though that prevents you from constructing a tooltip serverside that is synced
and... maybe we should support that usage, and the simpler proposal should just be mods can bring their own logic to implement conventions that we define
thats literally the first proposal then
a lot of people here keep inferring the first proposal does more than it does
if its just for display, the units would have to be agreed on as constants. and if you want to do something different you'd have to use your own namespaced unit
There is no transfer API integration (unless you define it), no built in ignredient (unless you define it), etc.
I thought the ingredient at least was part of the proposal
but what is the point of registering it code just to use it in a single place in JSON? might as well just define it purely in JSON
could be, need not be
I mean, its a trivial impl
if they are logical, we might as well define the ingredient
but its not essential
it can be in json, but "ingot" could only ever mean 1 value is what im saying
thats false
why would display only require units to agree
ingot only means 1 thing for molten metals in tinkers construct
though block means 20 different things
i agree with you, but im saying if its not used in any functional places you'd have to use a different name and establish a different standard for those 20 different things
I have a couple of weird ingots on non-metals in tinkers
nah, thats pointless
so, in the context of the first proposal where they really are some kind of objects that are usable for api-shaped things, and they are "registered" in some way: where are they registered? a static registry, a dynamic registry, a special datapack loader, tool-action-style code?
they all are just block, resuse the translation key
again, this is literally the only place using that number
there is not a benefit to abstracting it out just to type less in one JSON
data map, which is defined via JSON
data maps are a neo thing
no, the datamap associates units with fluids, where are the units themselves defined? are they still just strings?
by 'internal object' a tool-action-like thing then?
itd get confusing. like what does
"tcon:iron": { "block": 810 },
"tcon:diamond": { "block": 900 }
resolve to
or ToolAction, based on whether we want namespacing
ok
iron displays blocks as 810, diamond displays them as 900. Thats not an issue
there is no guarantee that a specific translation key is always the same size
its not logical, purely dispaly
In the tooltip, iron might dispaly as 3 blocks, 2 ingots, 5 nuggets
diamond displays as 3 blocks, 4 gems
those are just the same word, "block", they don't need differentiation unless the mod wants to differentiate them
if you are going to make a tank use these, block is a poor choice of unit as its not consistent. Hopefully ingot is consistent in your own mod, but if not, thats not a new problem
idk, it might get confusing. If you define your tank as being able to hold 270 mb, aka 3 ingots, and you say the capacity is 3 ingots but then you insert a fluid who says they contain 3 ingots but each of their ingots is worth 180 and they dont all fit itll confuse players. So "ingot" would have to mean the same thing everywhere in order for that to make sense, hence why i do not like the display only approach
tinkers has been doing it since 1.8
people can understand that a block of diamond is not a block of quartz is not a block of iron
and we have an item that holds 1 ingots worth of fluid, you just need to specify somewhere that means 90mb
yeah but they're all called a block, they might reasonably expect to be able to store 12 blocks of anything in there
no
not unless you make a tank that says it holds 12 blocks
which I never do as block is such a volatile standard
its one of those "what if" hypotheticals that is never done
I could say "this tank holds 12 blocks of molten metal" if I wished, but I just always use the word "ingot" for simplicy
exactly, you wouldnt be able to define those things. so the new display system wouldnt work in all places. id really like to also use it in empty containers to signify capacity in more meaningful units than buckets, but if everyone still defines "ingots" differently without me being able to know how much they intend an ingot to be worth it wouldnt be possible
thats nothing new
and thats a non-issue
and the other proposal does not really solve it either
if you wish to do an empty container that holds a logical unit without a fluid unit API, you just have to accept its a logical unit for a subset of fluids, its an arbitrary amount for the rest
If it matters so much to you, then in the fluids you define in your mod, never use block without an adjective
again, tinkers has been doing this for years, we define both a tank and an item that store ingots worth of fluid. We just also display the mb equivelent with that name
well it would solve this issue. because i can query every liquid to see how much they believe a block is worth and set my limit to respect it
eh, I suppose
what if a liquid doesnt say how much a block is
a lot of it comes down to what people want neo to do
then it does not have blocks
in the logical proposal, you don't store it in a blocks tank unless you define a fallback (e.g. 1 block = 1 bucket is reasonable)
if i show my container as storing blocks, i probably only want it to contain block based fluids
in the tooltip proposal, a block is just an arbitrary unit you made up, it maps to mb
I really don't get why so many people who I assume are coders are asking "what if the unit is not defined" when thats just an if statement
if (fluid.hasUnit(INGOT))
return fluid.getUnit(INGOT) * 4;
else
return 90 * 4
its my decision as a mod author if I define a tank as "holding ingots" how that interacts with either proposal
or return 0 and reject the liquid
yep
display only doesnt allow this :(
display only you just use a tag for that
if (fluid.hasTag(FLUIDS_THAT_CAN_BE_EXPRESSED_AS_INGOTS)
return 90 * 4;
else
return 0;
you'd give it a better tag name of course, I like overly verbose in pseudocode
ideally the tag you use is more than just "supports ingots" e.g. "c:molten_metals"
something that has some meaning to the player
alternatively, you could just define a datamap for this
tconstruct:copper_can_size would be
{
"values": {
"#tconstruct:fluid_types/metal": 90,
"#tconstruct:fluid_types/gem": 100
"#tconstruct:fluid_types/slime": 250
}
}
datamaps are pretty easy to define on an individual usecase like this
its what I'll end up doing if the fluid unit idea gets rejected
the downside to this approach is for a large variety of standard units such a thing will be a pain to query, but for a few specific usecases like pipe transfer rates or a special storage container size its not too bad
.
ultimately, I think the long term goal is ditching the idea that a fluid bucket must hold 1000mb, we want to be able to match it to a block volume instead of just dividing it into units cleanly. Before such a change is made, at minimum I'd want unit display to be a concept modders are using in Neo so its not such a break for players, unit display being a thing is how tinkers managed to get away with changing our fluid standard without confusing players.
Fluid unit API would be nice, but I don't view it as essential for the change in bucket divisions, just might be nice to have to solve a different conventions problem
in principle you can make a handler that's a different size per fluid even with the current api, though you have to decide what size it is empty obviously.
i guess you know that because that's what a casting basin does
well the casting basin's capacity is probably recipe based on based on this
like, i assume it renders fullness based on how much of the found recipe its completing
yeah, it reports 0 for the size if no recipe is active, but once you try filling it it reports the size as the fluid you try using to fill on simulate, or using the cached recipe on execute
its a very non-standard tank though. better to say its a fluid handler but not a tank
I am not sure how well other modders would accept a tank with fluid based size right now even if the API technically supports it
(thats something we can push for independant of this proposal)
rn its not super well supported. itll be something modders will easily be able to adapt to when the method to get the tank capacity of a slot has the fluid as part of the the method
thats part of #1183818213134446742 and a separate discussion altogether
Yeah, with both the unit proposal and no unit proposal, its still something up to the transfer API to support
all the unit proposal does is standarize concepts such as "4 ingots" so you don't need to make your own data maps
though tbh, most of the cases I wanted units for are specifc to a single thing so I'd be fine with a datamap for that anyways
Hmmm. Why the arbitrary 100 mb though
Was it 144 in older versions?
I think it might have been, but its been a while
144mb was the ingot value for older versions
i don't know what diamond was but emeralds were some batshit value like 333
666
public static final int VALUE_Gem = 666; // divisible by 3!

took me a while to remember how to navigate the tinkers 1.12 source
(why did gems need to be divisible by 3 but not 9? why wasn't 144, which is divisible by 3, suitable? it is a mystery.)
probably to balance how many emeralds you got by melting villagers
I don't think anyone will ever agree on how much of a bucket you can fill with a molten block
it's a silly undertaking
it has been seen for years that people have incompatible opinions
allow me to propose what I think is the ultimate bad idea. maybe someone can take something good out of it:
- FluidStacks don't hold a numeric amount, they hold a NumberWithUnits(long, Unit).
- Unit is a datapack registry. -- yes that means there can be "mod1:ingot" and "mod2:ingot" as different units! by design!
- UnitConversion is a datapack registry.
- Neoforge provides stock units for things vanilla has conversions for, such as 1 bucket <-> 3 "thirds bottle"s, and 1 bucket <-> 4 "fourths bottle"s
- any conversion that can't be done as a whole number, is invalid and rejected (you can't convert 1 thirds_bottle into fourths_bottles, but you can convert 3 thirds_bottles into fourths_bottles)
- we actively choose not to care how people deal with "leftovers" and we intentionally stay away from trying to define bucket <-> molten block
why I think this is a bad idea:
- it doesn't solve the ultimate issues, which is that people disagree on how to handle leftovers, and how to handle bucket<->molten block
- it requires a graph structure and computing shortest paths across the graph (and Orion will shudder at the thought of implementing Aequivaleo-lite into neoforge)
- it puts additional load into modders
- it puts HUGE load into modpack developers
I don't see how that's the case for 3 and 4
Neo providing units for most common units would satisfy the problem
And have everyone converge
There might be discussion on how many buckets an ingot is, but at that point, Neo being a centralized API would dictate it, like we do with RF
there's no meaningful way to define how 1 bucket and 1 molten block relate to each other
I mean we can say 1:1 I suppose
#2 is also not needed, as we can simply require every unit to have a mapping to every other unit
that increases issue #4
not fluid, units
you don't really need that either
Not really: it increases it only if mods decide to use non-standard units for their things
like mod1:ingot <-> mod2:nugget
you need to be able to write "I want 1 ingot of fluid"
If they want to measure something in not Bucket, Block, Ingot, Droplet, Gem, Bottle
and anyone can give you an ingot of fluid without thinking about the mB value
that only works if "ingot" is a predefined amount
yes, the fluid defines that amount
Which it would be
it is a property of the fluid
Centralized by Neo in this cas3
Not the fluid, but Neo
(Note my idea is based on your idea, Giga)
that would mean some fluids would work in some circumstances but not others, without a clear way for the player to know why. imho that would be the worst case version of this idea
I believe it makes a lot more sense to keep units and fluids defined separately
Well, no, there's a fallback value
if the fluid doesn't define a value, or doesn't interact, it is treated as the fallback quantity for the type
if there's fallbacks, that means you have to perform unit conversions
no, you just consume the amount specified by the fallback
wat
so if my fluid doesn't define "nugget" it suddenly consumes a whole bucket's worth without warning?
no...?
it consumes the default definition of a nugget
which is like 10mB
or whatever
err
notice that I said we wouldn't have a base granularity at all
there wouldn't be a mB int in my idea, it would always be tied to a unit
Same reason as any other value: buckets are stupid. 10 gems is a bucket with 100mb, the goal is always nice bucket divisions
this would impose that all units have a defined conversion to mB, which by this whole conversation, is the main point of contention
Why would you have a base mB unit?
There is no reason for that to happen
mB is dumb and arbitrary
We don't need it
Yes, but its still there, and does need to exist for now
you cannot randomly remove it, that will go nowhere
Says who?
the whole conversation™️
Removing it outright is a far larger change than this and is going to trigger even more alarm bells
Fortunately, we can build a little abstraction around it
in my (clearly labeled as bad) idea, the convept of mB would be intentionally removed, so that no one can complain about granularity
So the solution to trying to fix something is by not fixing the root problem because breaking changes
Even though Neo is all about breaking changes
it would be cleave out the problem by introducing a lot of other headaches instead :P
Well, sounds like a great plan, really
The solution is to build an abstraction away from it so we can reason about what things actually need doing
An abstraction that exacerbates the problem
how did you arrive at that conclusion
If you wanted to remove mB surely you would be in favor of less things referencing it
Except things are still referencing it under the hood
Nothing
you can't have a quantity of nothing 
If the problem is that people cannot agree on how many mBs an ingot is, then this won't solve that at all, because the fluid itself decides how much it is
So every mod has a different standard and this makes the problem even worse
The point is you don't have to agree
you just want <fluid ingot>
Given a thing that consumes a <fluid ingot> you don't need to think about the mB value
With random amounts, completely fucked up conversion rates, and overall with the same underlying system
Where did conversion rates come from 
If you had to convert something you would just make a recipe that takes <1 ingot> of <fluid tag> and produces <1 ingot> of <real fluid>
Not really, because standards are not about what neo does
Standards are about what mods do
If people have the ability to make fluids that display in nice units, it does not matter what standard they use
Hey, I enjoy standards
Neo is the standard
I would happily impose "ingots are X fluid units" everywhere
Otherwise what's the point of having it?
I think I would get yelled at though
No, neo is an abstraction layer
Mod compat layer if you prefer
It provides library's to make mods work together
Evidently it isn't
We don't need neo for standards
Some people are just afraid to define them outside of neo
If it were just that, we wouldn't have standardized stuff
See previous comment
We have been doing standards outside of neo since before the dawn of neo
Such as?
Been doing them since the early days of forge
Tag standards, oredict standards, fluid unit standards
Fluid units are so non-standard it's insane
We use the good old fashion trick of talking to each other other to make standards
Fluids are pretty dang standard, just a few weird expectations like Greg tech
What's non standard that you see?
So if they're standard, all of this is useless
No?
Everyone agrees on how much 1 ingot is
We don't need this PR
That's what Standard means
The point of this is not to fix a problem with mods disagreeing
The point of this is to add flexibility to mods that we are not allowed right now
And to add potential for future change to bucket volume for more flexibility
It's all outlined there in the proposal document
Which is inaccessible because pins don't exist in here
Yeah they do
Not on mobile
they do, in settings, because discord...
That sounds like discord is dumb, not a problem with the proposal
See that's why I opened https://github.com/neoforged/NeoForge/pulls
sir that's the pull requests search page
Literally one of the first sentences is "TCon says ingots is 90 and another mod 100"
Very standard
Perfection
Apparently pins on mobile require going to the forum directly and clicking pins
we love mobile discord™️
Which is actually stupid, because I have the old mobile discord before their garbage UI changes, and I can access the pins of the thread from the sidebar
My browser trolled me
Just a java class with static constants does not solve anything as we have discussed
It will
Though you are free to pin it here if you think it's important
The problem is not modders knowing, modders already know
The problem is players knowing
The problem is a mod being able to communicate the standard they use to players in a way that won't break just by putting their fluid in another mods machine
No
Yes
That sentence is already wrong
Do you even use fluids in a mod?
a mod being able to communicate the standard they use
No, a standard is not what the Mod uses
Because I do, and that is a problem
It's what everyone uses
Yeah, a standard is what a mod uses
tbh, this doesn't actually build the abstraction away from mB, since ultimately the values in data files would all still be mB values
Not what a specific mod uses
Part of what i prefer about the proposed is that you can just have type names for quantities in data
There are multiple standards, and there might be a most popular standard
Standard does not mean only one, you should know this as a coder
Ultimately though, none of this matters to players
All players need to know is howany useful increments of fluids they have
It literally does not matter if a useful increments is 90mb or 14b as long as they don't have to be shown the useless unit of mb
So this proposal is about unit display in tooltips
And unit display in tooltips could be trivially adapted to removing the need for all mods to follow the same standard, which gives modders more freedom
Apparently modder freedom is not supposed to be the goal of Neo though, neo is supposed to force all the mods in line
Look if you want to get rid of mb let's just do it
IMO we should
No more mBs
There is no need to build an abstraction around it
Just change it and be done with it
We don't need to break stuff twice
Just one big break
And have everyone adapt it
The proposal is 0 breaking changes
It's written as a fully optional API
When you use it, it means the break later won't be as bad, 1 file to change
Or you don't use it and have to deal with more work
Either way though, as outlined in the proposal, changing the bucket volume without unit display is a horrible idea, any fabric dev can tell you that
No one displays droplets as droplets. You need a human parsable method of display
That is what this proposal is about, human parsable display
Buckets would be buckets as units, not droplets
Oh, you are taking about the make every fluid pipe mod more difficult approach
As opposed to the make the magic number bigger approach
I have nothing against that approach, but good luck getting modders on board
I'm very much in favor of doing the abstraction instead of trying to blow everything up all at once
Such an approach would need a unit API anyways, might as well make such an API map to mb for now
One of the things I hate about how we do stuff here is the inability to do gradual change
The proposal outlines three potential paths from a unit API, such an API could lead to any of the three and need not even be decided now
Or if you think no unit API is needed at all, consider the fluid tooltip proposal below it
The horrible path is just changing the bucket volume and telling modders and players to figure it out
Well that's because other people are consuming it
Then again, note I am no Neo maintainer; so my opinion here is as relevant as any other one
I don't want my deps to break a little every update
Well we also have a build-on-commit paragidm
So large changes are a pita
rather, release-on-commit
not build, build is fine
You just squash them 🤷
Again, the proposal is not a breaking change until you make it one
It doesn't change the user facing model, only the neoforge developer side
You introduce it as optional, make it mandatory later if desired.
Give people plenty of time to start using it before deciding on how to fix bucket divisions sucking
At some point, once we get this abstraction, we can abstract the bucket to the fluid as well
and then a bucket can just be whatever the fluid wants it to be™️
You could do that, definitely an option
That is easier for recipes, harder for transfer APIs and storage
Well it isn't that difficult for them
they just have to do that conversion from bucket to <magic internal number> when doing i/o to a bucket
and to in-world, I guess
If bucket is dynamic what’s the anchor?
I guess there wouldn’t have to be an anchor
having bucket be a fluid unit would be nice, but might be controversial. It would be the logical conclusion of the idea
So I've slept on this, and while I approve of the display side of this, the whole "what is an ingots worth of fluid" stuff for the logical side seems backwards.
Whether an ingot requires 100mB or 144mB (or whatever arbitrary value we decide on in the background) should just be left to the recipes.
The concept of a tank that stores "4 ingots of fluid" is silly, fluids aren't the same density as solids IRL. The tank should hold a static volume of fluid, and how much that is in ingots should, in my opinion, be completely divorced from the storage parts.
Perhaps it would make more sense if these units were loaded from recipes? So that an ingot worth of fluid in the tooltip is always an ingot worth in reality.
A bucket of fluid is a measure of the volume of the bucket, if one bucket of fluid is enough to form into one block should be entirely up to the fluid. But how much fluid fits inside a bucket shouldn't be per fluid, IMO.
Using IRL is not great here because we do, in fact, use different units for different contexts when measuring different things. And the reason we don’t measure in ingots IRL is because an ingot can be of any size in the real world, something that is obviously not true in Minecraft.
Since this system is data driven, it basically is a recipe. It just allows devs to set their own ratios between the bucket constant and the logical units you’d use the fluid with. The reason it shouldn’t be a recipe is because this concept would get used so much outside the context of a consuming a recipes. Every mod would also need to define its own recipe system to be able to define these conversions, which would not allow for cross mod compatibility if I needed to understand what x mod fluid sets an ingot as because I’d need to either expliclty hook into x mods recipe or have x mod define their thing with my recipe. Fluid units is more compatible
use different units for different contexts
right, but the different units don't impact the volume of the fluid in question; so the tooltip definition of an ingot makes sense to be per fluid, but not the tooltip definition of a bucket
Right, which is what the current proposal does, keeps bucket as a constant
Essentially the whole thing is setting ratios between logical units, buckets, and millibucket.
Everyone is expected right now to set bucket to 1000 and all other values in the ratio must be positive integers. If a bucket was allowed to be set to anything it’d still always hold a buckets worth of liquid, the other logical units just wouldn’t have to be relative to 1000
So instead of 10:90:810:1000 it’d be 1:9:81:81. It doesn’t necessarily represent the bucket in any particular unit, it’s just a ratio. In this sense we would end up changing how we interact with liquids in Minecraft to just be alot more like how we interact with items, and a bucket would represent the “max stack size” so to speak, and containers would hold multiple “stacks” of liquid.
But again, this would be if we allowed bucket to also be dynamic, which this system does not currently propose
I think we should clarify what we do not want this PR to do
we do NOT want to remove the mB unit.
we do NOT want to introduce breaking changes if we can avoid it.
we do NOT want to force modders into standardizing what an ingot or a gem is, because it just doesn't work.
and we do NOT want to check for duplication loopholes (as Tech suggested), because that is way out of scope and has nothing to do with the system at hand
I don't think I would make use of this proposal, on the basis that I want to show mB amounts, not ingots/nuggets, to the user. And in that case, I don't see the benefit of using this API for the extra indirection, unless there is some compatibility advantage to doing so that I am missing.
if you dont want to use it, you arent obligated to. But this will allow you to display to your user more logical units of fluid. You, of course, can still show them the millibuckets, but for most use cases that amount of granularity is not helpful. Tinkers shows both using this system. They show the immersive units and show millibuckets if you hold shift
this system doesnt introduce any breaking changes, if you choose not to use it and you want to make say, a container that hold 10 ingots worth of liquid, your mod will be just as incompatible as it was before the system was introduced
what's your usecase? do you use fluids as fuel for machines?
I have 100mB ingots and 10/15/25/35 mB ores, and alloys that work with percentages
oh you develop terra firma craft. im reading the wiki for how your metal working stuff works, you'd definitely be able to make good use of it
if you dont want to thats fine, but its not true that it wouldnt benefit you
still not sure why that means displaying mb specifically, it seems like your real unit is one hundredth of an ingot.
"1 ingot, 47 mb" or "1.47 ingots" could be a useful display there
yeah, which in our case is exactly = to a mB, so again I'm not sure what benefit this API provides except for indirection
I think both of those are worse than "147 units", especially when you have to add those together and ensure that it is between 8-12% of your target amount
i mean ultimately, when it's just multiplying or dividing by 100 it's easy enough for users to convert between mb and ingots in their head but that doesn't mean displaying it as ingots isn't friendlier
i haven't played tfc in ages and i didn't get very far in it so i don't know much about how your metal system works
but it looks like you have a couple of screens that actually calculate the percentages
like how would it be substantively different if these said "48.8 ingots" and "5.6 ingots"
it really seems like terrafirmacraft is designed to be its own, complete independent universe of how things work. especially considering your metals already dont follow the standard ingot amount. But if you wanted to you could assign these values to your liquids so other mods understand how many millibuckets of fluid TFC assigns to an ingot.
i'm not sure i understand why a "unit" is better 1 mb rather than 100 mb with two decimal places anyway - just because other things use mb so this way people can understand it in other mods' tanks?
1.47 and 147 provide exactly the same information
and if a bucket ends up being 81000 units, is it better to display 1.4789 or 11979? i suppose you could display 147.89 but i don't really see the attachment to 1/100 of an ingot as a size unit when you're displaying the actual percentages in a quantity-independent way
This screen was never part of TFC and dates back to 1.7.10
and if a bucket ends up being 81000 units
I don't care at all what the size of a bucket is - just an ingot. If an ingot is any multiple of 100, I could see a point in using this display API wherein a "unit" is whatever I need to make an ingot "100 units"
it really seems like terrafirmacraft is designed to be its own, complete independent universe of how things work.
mhm, true (but also there is no standard - there's a TFC pack using ingot=144 rn because of gregtech, and TFC is customizable enough to make that possible).
there is a standard, 90 mb is the current "standard" for mods that arent gregtech
i mean let's be real there aren't all that many molten metal mods
there's tinkers and embers, and gregtech which doesn't use the standard and tfc which doesn't use the standard
there was some other mod in the 1.12 days which i think used 108 mb instead of 144
can we take a moment and appreciate how this discussion already almost has 3k messages
*waves at @elfin yacht *
scrim
go review your favourite pr
whimch
the damage stuff one
in that case i think that if people doing the math in their head benefit from ingots being 100, they would benefit from the display being changed to "ingots with 2 decimal places"
Yeah, I don't think a mod that does not intend to make their fluids have compat cares about a compat API
If TFC wished they could use the proposed API to support their iron in machines from other mods despite using a 100mb standard
But they might encouter trouble trying to go the other way, 90mb ingots in their logic
Sounds like they'd have a TFC-specific unit for "100ths of an ingot", as it were, that other mods aren't guaranteed to support, and then it'd all Just Work -- mods can support it if they choose, for the right ingot size, but there's no need to
Or I mean, heck, they can just check whether the size of the ingot of the fluid they might support is divisible by 100
Yknow, i think most of the concerns with the fluid unit system are non issues.
Major concern right now is that this system would introduce discord among fluid standards when we should just be using constants. But ultimately i think the PR introducing this system and tech's PR for constants can actually both be merged and it would be fine.
The constants would just set the established standards in stone, and people who put their tag in the molten metal tag or some other "standard" tag could still be required to follow it. This would essentially just be how the system is right now. You apply the standard to the things that follow the standard and everything else is ignored. This system does not try to say anything in those tags can have any value, so you are unaffected. If you are content with only being compatble with the liquids in that tag, you need not change anything
But if you want to be more compatible with other "ingots" then you need only make a few changes to be able to do so. You'd use units instead of the constant. This is, overall, less work than what someone would need to do to be compatible with more than one standard anyways. If someone wanted to do this without the fluid unit system they'd need to figure out what the other standards are and special case them in their mod. This system will just handle all of that for you, so in that sense it makes things easier. Your mod now becomes compatible with all standards, not just the 1 standard.
The old tag would still exist, and if you really want we can even make constants for the standards. This system just makes it friendly for other authors who want to establish something abnormal without being completely left out in the cold. As of right now, they would be left out in the cold because its too much effort to account for them. If after its established people still think its too much effort, they can continue to leave those devs out in the cold, nothing prevents them from doing so.
@rugged barn @astral stag ^
As another example, I could potentially convert from one instance of molten iron to another by scaling based on the ratio in INGOT unit values for each.
Hypothetical then: user melts a 15 unit ore (TFC) and wants to pipe it into a tinkers' machine using 90mb=ingot. How does this transfer the 13.5 mB it should. Is this just the limitations of what this compatibility would achieve?
If I'm using the display API, user sees "0.15 Ingot" in the TFC machine, and they should see "0.15 Ingot" in the tinkers machine, but from their PoV, it just doesn't work, sometimes, seemingly without reason (either lossy, discrete, or other restricted transfers have to be in place here, unless I'm missing how this would work)
You would need to have a "smallest" unit that doesn't involve fractions against mB values
But I think you've misinterpreted slightly how it works
tcon will not attempt to treat your fluid at 90mB/ingot
tcon will query your fluid for what your fluid declares is an "ingot" in mB
and use that when tcon wants to consume 1 ingot's worth
So you can use whatever scale is appropriate for your fluid (which I guess is 100/ingot?), while tcon's fluid uses 90mb/ingot
All the while, recipes are just written against the fluid-defined "ingot" value instead of a specific mB amount
Yeah this use case wouldn’t really work unless the ratios between the units are the same. If my mod is worth 10 and theirs is 16 but I still follow the 9 nugs per ingot, 9 ingots per block it shouldn’t cause any issues. But different amounts of the same kind liquid across different mods is a unification issue, not a fluid unit issue
I still don't think I quite see the benefits this would bring for compatibility between mods a priori using different standards - trying to reconcile with code I know. And switching standards is dependent on a lcm() argument over anything else, which is going nowhere. So I guess I'll just wait and see if/when this API gets real use.
It means mods don't need to reference static mB values for compat, or even need to agree on the same values
Yeah that’s fine. I think the important part is that it wouldn’t require you to change any code if you didn’t want to try to be compatible with other standards
the main effect on compatibility would be that if tfc declares an ingot is 100 mb, then tinkers could - at least for the metals that have recipes built into tinkers construct - use 100 mb to cast that ingot and 900 to cast a block, since it has a way of knowing that this fluid is 100 mb per ingot
and could use e.g. 300 mb of tfc copper and 90 mb of some other mod's tin to make bronze
tfc could, if it so chooses, do the same for its alloys - treat the 90 mb of tinkers construct tin or 144 mb of gregtech tin as being the same as 100 mb of one of its own fluids and calculate the ratio in the alloy as 75% 25% [which is to my understanding not enough copper for tfc bronze, but pretend i calculated a ratio that would work]
yeah, basically the fluid unit system operates under the assumption that you rarely ever actually want to use the raw millibucket amounts for things. Usually you're combining 2 logical amounts of something in order to turn it into another logical amount of something, eg for bronx you're turning 2 copper ingots and 1 tin ingot into 3 bronze, so instead of specifying the specific amounts you specify "2 ingots" and the fluid tells you how much liquid that should be.
but if you do need to use the base mb, those are still there
nothing stops you from just using that
in fact there are alot of situations where that might make sense, like if you want to do very small conversions. like, converting 3 mb of water into 2 mb of hydrogen and 1 mb of oxygen
The issue is that tech's PR is fundamentally a step backwards. Like, I shouldn't have to have a block be less/more/whatever-the-fuck-it-is-now than a bucket for my fluid to be a molten metal! I should be able to have a molten metal -- in the molten metal tag -- with a block as one bucket, and the unit system would let me do that but let things expecting certain properties for "molten metal" to still respect that
that would be nice, but if you did that this would become a breaking change
because now youd have to use the fluid unit system to understand whats what
Yes, that's the idea in my mind. Introduce the fluid system now, deprecate the "specific amount of mB" fields. In a later breaking change, (1.22 or later), remove whatever mB_per_bucket field or whatever there is, make it so that there no longer has to be 1000 units per bucket
Sort of a two part change
sounds nice in theory, but in practice getting people to agree to that would be a nightmare
lets just try getting this through, its still a massive step forward
even while not breaking anything
I mean its really not that much of a nightmare. You need to reason in buckets still? Grab the bucket unit. Make a requirement that every fluid define that one, and you've got a common point of reference
And I agree, getting this part through is obviously the priority
yes, but that would fundamentally require everyone use the fluid unit system
which is not currently a requirement in the proposal
My point is just let's not push through something else that makes an end goal of not forcing everything into these arbitrary standards harder
Which is what tech's PR does -- it bakes in the annoying, inconsistently-followed, and generally hard-to-make-sensible standards that we're working with, and makes any down-the-road change to peple having to use the unit system to reason about ingots, etc much harder
You could also have some defaults. Or, rather, one default -- of X number of units per bucket, if the modder doesn't define anything themselves
But regardless, as you've said, that's much further down the road, and shouldn't really effect the proposal too much
yeah, techs PR after the introduction of the fluid unit system wouldnt so much be "the" standard, but rather the default standard
its what everyone who doesnt use the fluid system will use, and that, to a certain extent, is needed for backwards compatibility
Right but that's what I'm saying. There shouldn't be any "default " standard, except perhaps for buckets...
If you don't use the fluid unit system, it should be impossible to reason about an "ingot" of your fluid
The fluid unit system would be a way of saying "my fluid makes sense to measure in ingots and here's what I mean by one"
i mean, it should still be supported that "any metal in the very specific x tag should function like this". you and I, users of the fluid unit system, dont have to care about the tag stuff cuz you and I will be using fluid units to tell what supports an ingot, not the tag
If you have a "default standard", people are going to start expecting other people use it
I should be able to put a fluid in the molten metal tag even if it has a different number of ingots per bucket than some "default" or "standard" amount
The number of ingots per bucket is determined by the fluid unit system, not the tag
It tells me that it's a metal, and its molten
And it also tells me -- I would argue -- that I should have defined certain units on it, namely probably ingots and blocks
then yeah i think i agree. maybe we should have a c:standard_metal tag for molten fluids that support the 10:90:810 stndard
No
Those fluids shouldn't get special treatment
Like: what would you conceivably do with such fluids, that you couldn't do with other molten metals if you used the fluid unit system correctly?
we gotta have something, we cant fundamentally get rid of the old standard, there still has to be a way to do this in a rudimentary way without the fluid unit system, otherwise this is a breaking change and the proposal is a million times harder to get through review
The proposal isn't the breaking change. The breaking change comes later -- I'd push for 1.22 or later -- when you remove the 1000-units-to-a-bucket standard
Also there is no standard that's followed now
So its not a breaking change in that regard either
The only "standard" that's consistently followed is 1000 units per bucket
thats not necessarily true, i think people current expect things in the molten metal tag to behave as 90 mb. but idk, thats not a neo established standard so its quite fluid (badum tsch)
Some people expect that but not all mods with molten metals behave that way... in fact, several exceptions have popped up in this thread. So have a few mods that behave that way but really ought not to because it causes them issues
hmm
Tech's PR bakes in a standard that obviously doesn't work. The fluid unit proposal provides a new system that currently is just a nice tool to work with and let people talk about those currently-non-standardized things sensibly, but in the future could be used to remove the standardization on even the number of units per bucket if necessary
At the end of the day they're just two different ways of asking "how much fluid goes into an ingot"
And the PR that adds a bunch of constants -- that is an approach that we've seen, with a lot of different examples, isn't actually what mods need
The point is that once a fluid unit system, like the proposed on in the pins, exists -- mods shouldn't make assumptions about default-mB-per-ingot or whatever. They should just query the fluid unit system
Currently they have to make assumptions because there's no standard. This lets them not make any assumptions, without introducing a restrictive standard
its a standard that does work, but not for every use case. our PR works for almost every usecase. the only thing our PR does not work with is that it currently registers them in data, so it doesnt account for fluidstack specific units like tool actions do. so if a unit was dynamic based on its data components it wouldnt be supported. BUT it wouldnt be supported in the old system because of tags so im okay with this
i say our PR like it exists lol
Fluidstack specific units? Give me an example of why you'd need that
Or even what that'd look like
idk, you could have a data driven fluid that behaves differently based on a datapack entry
@vernal bane do you have data driven liquids in productive bees?
resourceful bees doesnt have this issue because it just registers new things at start time, but i think productive bees is more datapack based
so their fluids would realistically need to be different units based on the type of bee the liquid came from
Sure, if you really wanted to you could make the integer unit field also accept a FluidStackSizeProvider extends Function<FluidStack, Integer>, as an alternative to just a plain integer, based on a codec from a Registry<MapCodec<? extends FluidStackSizeProvider>> or something. That's totally a solvable issue
But the other lovely thing is that the proposal as-is could always have that feature added later without changing how the unit API looks to anyone using it normally, even for querying fluids
Its a system that adds flexibility and lets people not make assumptions, making extending it down the road easier
Something adjacent to the idea of fluid units that might be worth handling is defining a better standard for fluid tags
right now, people just use root tags like molten_iron
Its possibly a better idea to use tags that specify the standard in some way, perhaps metals/iron gives you the 90mb ingot standard, and we encourage a different tag folder for the 100mb standard and the 144 standard, should they wish to tag
if the fluid unit proposal gets accepted, it would be good to distinguish the legacy "we use the 90mb standard" tag from the new "we use the fluid unit API" tag
worth figuring out before mods with molten metals start porting to 1.21
Some broader questions to ponder: do we want a root tag for all fluids under the 90mb ingot standard? E.g. c:metals
Do we want a tag for all molten iron regardless of unit standard? Something terrafirmacraft and gregtech can use if they wish with no assumed size
@deep hamlet is worth asking on that note, do you have any use for identifying a fluid is a molten metal in TFC via tags even if it's not using 100mb ingots? Or is that something that won't benefit you?
That doesn't change my opinion that we don't need this API. We should get the common case working in a simple way.