Minecraftforge: [Vanilla Bug] The Frostwaker Enchanment breaks Forge Liquids

Created on 17 May 2017  路  21Comments  路  Source: MinecraftForge/MinecraftForge

The Frost Walker Enchanment turn any Block from Material Water into their Ice, wich smelt back to normal Water. This will turn any "modded" liquid into water.

Bug Fluids

All 21 comments

What would be the better solution to fix this, adding a TIleEntity to the frozen ice wich stores the old block, or a (Weak)HashMap ? The problem with the mPa would be world saving and loading, but adding a TileEntity also feels not quite right.

Probably a getFrozenBlock in the fluid class and check for it and if it's
null, skip the enchantment.

I also noticed if someone makes a non BlockLiquid water block the frostwalker enchanment will most likely crash, because it tries to access the LEVEL property.

I would rather have a slightly raised ice "plane" (1px high) above the fluid rather than bypass the enchantment.

I would rather have a slightly raised ice "plane" (1px high) above the fluid rather than bypass the enchantment.

How would that even work...

Well, not without adding a custom block, so probably unrealistic to add to Forge.

And if we do a getFrozenBlock there would need to be two variants, one for frost-walker and one for "normal ice".

boolean canMelt?

It's actually not just that. There are 3 types of ice in vanilla: the never-melting packed ice, the normally-melting ice and the always-melting frostwalker-ice.

Can you actually make packed ice from water, though?

No, but if we add such a method it would be nice to make it as useful as possible. One can imagine a "deep froster" from a mod which creates packed ice from liquids.

In any case, adding a method to IFluidBlock is not possible before 1.12 anyways.

I'm still thinking we're overthinking it. Why would anyone register three different blocks just for freezing? Special-casing vanilla is nothing weird in modding.

thats why is suggested a Map or TileEntity

Map is basically the same and tile is probably a vanilla-compat breaking
change.

@diesieben07 well then it is hard to add support for it as a Mod. But we can post an Event so a mod can do it, maybe a cancelable one to give the ability to block vanilla from freezing water.

Yes, and that's when we go down the rabbit hole...

But an event would be a clean solution and doesnt need any adition of getFrozenBlock or any of it, but has the power to prevent vanilla behauvier and adding own frozen blocks.

Note that this doesn't happen for all modded fluids, as its possible to get all of the same effects as normal water by overriding a few methods and have a different material (which bypasses this issue)

I think the simplest solution here is to make them only work on water.
If you want something like oil-walker enchanted boots, it might be best to leave the implementation to a mod instead of extending vanilla functionality.

I will submit my implementation as a PR then.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MinecraftPlaye picture MinecraftPlaye  路  20Comments

ShieLian picture ShieLian  路  42Comments

viveleroi picture viveleroi  路  30Comments

jredfox picture jredfox  路  38Comments

Dockter picture Dockter  路  27Comments