#How to add custom fluids using datapacks?

1 messages · Page 1 of 1 (latest)

fading lance
#

how to assign custom fluids for VS2?

bold yew
#

ngl I have no idea

fading lance
#

@sacred temple do you have any idea?

bold yew
#

no

#

tomato added the feature

#

ok so

#

looking at the code

fading lance
#

i tried to look in /data folder but i didn't find anything notable

bold yew
#

it appears that, if the block state is considered "liquid" (set by mods, not by your datapack), then specifying mass actually specifies fluid density, and specifying friction actually specifies drag coefficient

#

so you basically just do it like a normal block

fading lance
bold yew
#

basically use uh

#

/setblock

fading lance
bold yew
#

to see what the block id of the fluid is

bold yew
fading lance
bold yew
fading lance
#

yes

bold yew
#

and restart your game?

fading lance
#

/reload

fading lance
fading lance
#

or mb i put it in wrong folder

#

also i tried to add it through fluid bc fill command shows fluid/

[
{
"block": "tfc:fluid/river_water",
"mass": 1000,
},
{
"block": "tfc:spring_water",
"mass": 3920,
}
]

bold yew
bold yew
#

I guess trust F3

fading lance
bold yew
#

water is hardcoded

fading lance
#

i think i can write a mixin to pass water tags to piece of code where it was hardcoded

bold yew
#

try and figure out why datapackable fluids aren't working

#

and try to fix it

fading lance
bold yew
#

yeah

fading lance
bold yew
#

I'm sure if you step through the fluid block state registration with a breakpoint the reason its not working will become clear

#

these problems usually aren't too hard to spot if you've got an actual datapack to debug step by step

fiery karma
#

hello

#

:)

#

and how to add custom fluid?

bold yew
#

Well, if it’s working

fiery karma
#

So it might not work?

bold yew
#

It might be bugged I’m not sure

fiery karma
#

ok

#

ty

fading lance
#

I figureed out how to make it work

so you should create a datapack

put
[
{
"block": "tfc:river_water",
"mass": 1000.0,
"friction": 0.3
}
]

in this folder of your datapack
namespace/data/namespace/vs_mass/fluids/fluids.json

bold yew
#

Does it need to be in a fluids folder? Interesting

fiery karma
#

but I already did it

fiery karma
#
Valkyrien Skies Wiki

Valkyrien Skies has a few built-in datapack systems that can be used to tweak its functionality or provide extra compat.
To start off with, you will need a datapack. The Minecraft wiki has a tutorial on the basics of setting one up here.
Valkyrien Skies currently has 3 datapack features. Being able to modify block properties (mass, friction, etc...

bold yew
bold yew