Make fluid transfer handlers process before fluid capabilities to workaround bugged fluid capabilities
KodYazanDruid opened this issue ยท 5 comments
Minecraft Version
1.18.2
Forge Version
40.2.9
Mantle Version
1.9.45
Tinkers' Construct Version
3.6.4.113
Describe your issue
Fluid transer for mantle:fill_item doesn't work properly.
I tried adding my own filling/emptying interaction via datapacks. Emptying (item -> tank) works fine but filling (tank -> item) gives me bucket of fluid instead of giving the "filled" item.
This is the video of script below.
https://files.catbox.moe/te2ewg.mp4
{
"type": "mantle:fill_item",
"input": {
"item": "miners_delight:copper_cup"
},
"filled": "miners_delight:mushroom_stew_cup",
"fluid": {
"tag": "forge:mushroom_stew",
"amount": 250
}
}
Crash Report
No response
Other mods
Mod List:
client-1.18.2-20220404.173914-srg.jar |Minecraft |minecraft |1.18.2 |DONE |Manifest: a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f
TConstruct-1.18.2-3.6.4.113.jar |Tinkers' Construct |tconstruct |3.6.4.113 |DONE |Manifest: NOSIGNATURE
FarmersDelight-1.18.2-1.2.3.jar |Farmer's Delight |farmersdelight |1.18.2-1.2.3 |DONE |Manifest: NOSIGNATURE
rhino-forge-1802.2.1-build.255.jar |Rhino |rhino |1802.2.1-build.255 |DONE |Manifest: NOSIGNATURE
miners_delight-1.18.2-1.1.1.jar |Miner's Delight |miners_delight |1.18.2-1.1.1 |DONE |Manifest: NOSIGNATURE
forge-1.18.2-40.2.9-universal.jar |Forge |forge |40.2.9 |DONE |Manifest: 84:ce:76:e8:45:35:e4:0e:63:86:df:47:59:80:0f:67:6c:c1:5f:6e:5f:4d:b3:54:47:1a:9f:7f:ed:5e:f2:90
Mantle-1.18.2-1.9.45.jar |Mantle |mantle |1.9.45 |DONE |Manifest: NOSIGNATURE
architectury-4.11.93-forge.jar |Architectury |architectury |4.11.93 |DONE |Manifest: NOSIGNATURE
jei-1.18.2-forge-10.2.1.1005.jar |Just Enough Items |jei |10.2.1.1005 |DONE |Manifest: NOSIGNATURE
kubejs-forge-1802.5.5-build.569.jar |KubeJS |kubejs |1802.5.5-build.569 |DONE |Manifest: NOSIGNATURE
Tried reproducing with just Tinkers?
Yes
Performance Enchancers
Magnesium
Searched for known issues?
Checked pinned issues, Searched open issues, Searched closed issues, Checked the FAQ
The system when originally designed was made for non-fluid containers to be filled and emptied, I did not expect anyone to use both so the order is mostly chance.
I will consider whether swapping the order will lead to issues, I might have had a reason for it originally that I just do not recall. But yes, this is ultimately a bug in the other mod, which will affect enough that it really should be fixed in Miners Delight. Honestly, they should just ditch the fluid capability if they are not going to implement it properly, the code you linked suggests "copied and pasted from buckets without considering what it does"
2023-08-25.20-40-23.mp4
This is the video with least mods possible (given from other mods list)
It definately works properly, we use it extensively in Tinkers' Construct for all soups, potions, and alike.
That noted, the transfer logic will prioritize a fluid capability if present before trying to use the JSON based logic as a fallback. So it is highly likely your item just has a broken fluid capability. For custom items it is preferable to use that system as it gives you compatibility with more mods.
I looked up Copper Cup class and it might be caused by broken fluid capacity also there is already bug report for copper cup turning into water bucket.
{
"type": "mantle:fill_item",
"input": {
"item": "minecraft:coal"
},
"filled": "minecraft:diamond",
"fluid": {
"tag": "forge:beetroot_soup",
"amount": 250
}
}
and this works fine ._. Is there way to force it to use fallback option? I might try something with kubejs via reflecting classes.