[rewrite] Breaking blocks underwater creates minecraft:flowing_water blocks
embeddedt opened this issue ยท 8 comments
It seems that with Fluidlogged API 1.7 installed, breaking blocks underwater creates minecraft:flowing_water
blocks in their place, at least on the bottom level. Below is a screenshot. The stone blocks represent the blocks I would break. It seems to be specifically the bottom back two blocks that are affected the most.
I noticed this because my item floating logic, which relies on isInsideOfMaterial(Material.WATER)
started not working in this position, likely due to the "height" of the fluid being lower than a full block?
I also found that isInsideOfMaterial(Material.WATER)
sometimes returns false
for a few ticks in this specific scenario; not sure if that's related or not. If the fluid is "flowing" down, would that create more vertical velocity than in vanilla?
It seems that with Fluidlogged API 1.7 installed, breaking blocks underwater creates minecraft:flowing_water blocks in their place
This is intentional, this mod should have any vanilla BlockLiquidStatic
blocks the world immediately converted to their BlockLiquidDynamic
counterparts, for more consistency. Vanilla has these two classes to reduce unnecessary block updates. One thing this mod does is replace the vanilla fluid logic with forge's, which has its own ways of handling unnecessary block updates, and doesn't need the two block system as a result.
I tested the situation, and noticed that I swam slower upward when next to other blocks. I'll fix that, I don't like it very much lol. Entity.isInsideOfMaterial(Material.WATER)
doesn't care which of the two fluid blocks the entity's in, so perhaps the item's downward motion is fighting its newly applied upward motion, and that's why it isn't moving to the surface?
perhaps the item's downward motion is fighting its newly applied upward motion, and that's why it isn't moving to the surface?
This mixin works 100% correctly when Fluidlogged API is not installed (i.e. the blocks are minecraft:water
blocks), but I can try tweaking it.
Recreated EntityItemMixin
to test with the latest commit, and it seems to work. Closing this for now.
I also found that isInsideOfMaterial(Material.WATER) sometimes returns false for a few ticks in this specific scenario
huh, I'll look into this
I also found that isInsideOfMaterial(Material.WATER) sometimes returns false
The isInsideOfMaterial
method, when interacting with vanilla fluids, uses only the block's metadata to calculate how deep the fluid is. Apparently this mod gives the vertically flowing fluids a metadata of 7 (whereas vanilla expects them to have a metadata of 8), hence the problem. This was fixed with the past two commits, along with a bunch of other issues that were caused by this (even lighting somehow)