Add Ability to set Custom Fluid Tick Speed

Status
Works as designed
Issue description

Add Ability to set Custom Fluid Tick Speed

i am not talking about the fluid density and viscosity. 

I want to alter the fluid tick speed to make quicksand that sucks the player down faster than cobweb using the set in cobweb for 1 tick procedure.

Issue comments

Fluid density and viscosity directly control tick speed, this is what these parameters are for, check the fluid block code and you can see tick rate in managed be these.

@klemen - Something is not right with the SetinCobweb procedure and custom liquids

I set the viscosity and density on my custom fluid to both 1 and with the setincobweb procedure the player still sinks at the same slow speed. Some forms of quicksand such as liquid peat or thin volcanic clay or mire should be the same as water 

i want to make it so it is hard to escape from the fluid if you go too deep and it's too thick like real quicksand.

if we can't get this figured out in future versions i will have to tell you my idea of implementing some "well known mod" mod elements like a mcreator version of buildcraft pipes.

@klemen

I just did another test and found a major bug with custom fluids, Fluid Density and Viscosity is not properly simulating real life fluids at all...

i set a custom fluid with a Density and Viscosity of both 100,000 and when the player or mobs jump into it. it acts like normal water and the player can swim around in it like it's water. It still flows very slowly. 

in real life if you tried to jump into a fluid like that it would be thicker and move slower than hard cement.

Also to simulate quicksand properly we need some procedure to alter the viscosity of a custom fluid in game or simulate it by changing the tick speed that set in cobweb depends on in game.

MCreator applies these two parameters directly to forge fluid API, I will see what can be done to extend this if possible.

What is wrong with set playe in the cobweb procedure? Make sure to call it each tick as the effect is only there for the current tick.

@klemen

i may have figured out what's going on, We need to find what the setincobweb procedure calls upon FOR the tickspeed on custom BLOCKS when you set the tickspeed of custom blocks because when you set a high tickspeed for custom blocks, you sink a lot faster though them with the setincobweb procedure and implement the same thing on custom liquids.

in code on custom blocks the tickrate control that affects web appears to be

@Override
        public int tickRate(World world) {
            return 1000;
        }

As i said We need to get things so the custom fluid has a faster tick speed that the set in cobweb procedure calls upon when the player collides and enters the fluid so they sink faster due to the faster tick speed which is used to simulate real like mud or clay like quicksand or bog muck.

I will check what can be done as messing with tick speed of fluids is not a good idea as it might break fluid API.

@klemen

Ok, after testing, setincobweb with custom blocks something weird is going on and it seems setincobweb no longer effects movement speed based upon tick rate, i set a custom block with a tick speed of 1 and one with 100000 and the cobweb sinking speed is the same...

We need a procedure implemented that can change a entity's movement speed when triggered. This would be the other option to use a procedure to detect entity colision with the block and dramitically slow the movement speed, but they would need to sink slowly too.

I think i may have found how they made sinking work in morefunquicksand mod, looking at the code of the MoreFunQuicksand Mod now. i think they used a custom potion effect that changed the movement speed attribute. Still trying to figure out how they got quicksand liquids to pull mobs and the player under completely.

@klemen - The developer of MoreFunQuicksand Mod said the following about how the mods QS Sinking Physics work...

"It's a web physic + vertical velocity adjustment. In other words QS push entity with near same velocity as global MC's gravity have, for make slow effect of sinking."

Thank you for the information, I will take a look into this. 1.14.x changed fluid system a lot too, so it might be possible to do this with fluid system too.