Origins (Forge)

Origins (Forge)

7M Downloads

Fluid height not working with custom Fluid tag (as well as in_tag for fluid condition)

HerobrineXia opened this issue ยท 1 comments

commented

basic:portal_fluid.json:
{ "replace": false, "values": [ "betterportals:portal_fluid_still", "betterportals:portal_fluid_flowing" ] }

water_vulnerability.json:
{ "type": "origins:multiple", "damage_from_water_and_rain": { "type": "origins:damage_over_time", "interval": 80, "onset_delay": 1, "damage": 2, "damage_easy": 1, "damage_source": { "name": "hurt_by_water", "unblockable": true, "bypasses_armor": true }, "protection_enchantment": "origins:water_protection", "protection_effectiveness": 1.0, "condition": { "type": "origins:or", "conditions": [ { "type": "origins:and", "conditions":[ { "type": "origins:fluid_height", "fluid": "minecraft:water", "comparison": ">", "compare_to": 0.0 }, { "type": "origins:fluid_height", "fluid": "basic:portal_fluid", "comparison": ">", "compare_to": 0.0, "inverted": true } ] }, { "type": "origins:in_rain" } ] } }, "damage_from_potions": { "type": "origins:action_on_item_use", "item_condition": { "type": "origins:ingredient", "ingredient": { "item": "minecraft:potion" } }, "entity_action": { "type": "origins:damage", "amount": 12, "source": { "name": "hurt_by_water", "unblockable": true, "bypasses_armor": true } } }, "damage_from_snowballs": { "type": "origins:modify_damage_taken", "modifier": { "name": "Snowball damage taken like Blazes", "value": 3, "operation": "addition" }, "damage_condition": { "type": "origins:projectile", "projectile": "minecraft:snowball" } } }

I have installed another mod, which one of its fluid contain #minecraft:water tags.
I created a custom fluid tag called basic:portal_fluid and it is successfully added by checking through F3 Targeted Fluid.
But when I use it in fluid height check, it is not working and I will still taking damage in that fluid.

commented

This is unfortunately a limitation of Minecraft not fixed by Forge. There isn't much I can do without the risk of causing serious damage to other mods fluid heights. If you have some knowledge of Minecraft's code, I would recommend you take a look at calls to Entity.updateMovementInFluid for more information.
The only supported tags to date are water and lava, if a mod correctly adds and handles movement in a fluid, you'll be able to use those, otherwise, I'm afraid you'll be stuck with the default fluids.