Moonrise icon indicating copy to clipboard operation
Moonrise copied to clipboard

Count fluids by their type to avoid unnecessary reads in Entity#updateFluidHeightAndDoFluidPushing

Open wuangg opened this issue 1 year ago • 2 comments

Avoid searching for chunk sections that don't only have non empty blocks, but also non empty fluids

wuangg avatar Oct 01 '24 23:10 wuangg

Since Fabric/Vanilla version of the method has the TagKey as a parameter, we would like to only check for the count of non-empty fluid states that have the same fluid TagKey to avoid unnecessary chunk section searches that do not have any fluid has the same TagKey as the parameter.

As for modded fluid/NeoForge version of the method, I will implement a counter for generic non-empty fluid states.

wuangg avatar Oct 05 '24 10:10 wuangg

Counter for generic non-empty fluid states has been implemented.

wuangg avatar Oct 05 '24 13:10 wuangg