Device: HTC 10
The add-on component "minecraft:floats_in_liquid" doesn't work. I attached an add-on that attempts to use it on Cows without modifying any of their existing components, with the only addition of this dysfunctional component.
The component is supposed to make the entity type float in liquids (unsure about which liquid this component refers to, I don't think it refers to lava so I suppose it is water), but when the entity (in this case Cows) are placed in water, they don't float.
(With floating the component refers to kind of replicating Boats, however, if the entity doesn't have a minecraft:behavior.float, they'll sink in the water and drown.)
Also, please remember that minecraft:behavior.float is aimed at having entities float in water to prevent themselves from drowning, while minecraft:floats_in_liquid is supposed to replicate the Boat floating effect. They're not the same thing.
Attachments
Comments 6
I mispelled the component name when writing this issue, yet it is written correctly in the behavior pack I uploaded: https://i.imgur.com/VdJAmpz.png
I see what I think is the problem. In your behavior pack, you have used comments to mark what you added or changed. The standard JSON file format does not support comments. Many implementations extend the standard to make adding comments possible, but as there is no standard for it they use many different syntaxes. Mojang's implementation of JSON currently supports line comments starting with "//" (though this is subject to change), but not the block comment style you have used. I think the JSON parser probably saw the invalid syntax as an error and skipped until it found the next outer set of { } brackets. That would have made it skip both your "minecraft.floats_in_liquid" and your "minecraft:behavior.float" additions in this case.
Please note that this is a bug reporting tool, not a debugging help site. You should report problems like this only after you have made certain the error is not in your code and must therefore be in the game itself. There are many proper places to get help like what I've provided above: I would recommend the #technical-bedrock channel on the Minecraft Discord.
I would like to leave clear that the attached add-on is just a plus to the bug report. I have tested every existing way possible to make mobs float with this component (including each navigation combination possible) and hasn't worked. You're always welcome to make your own add-on to prove that this component doesn't work.
Still an issue. The add-on loads fine and any other modification made to the entity (except :floats_in_liquid) will work fine.
Cleaning up old tickets: This ticket has not been updated recently (~1 year+) so is being closed as Cannot Reproduce. If you feel this is still a valid issue then please comment, or create a new ticket following the Issue Guidelines.
Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki
According to the Entity Component Reference Guide for 1.2.9, which is provided by the Mojang staff directly, there is a "minecraft:floats_in_liquid" component (with the description "Sets that this entity can float in liquid blocks"), but there is no "minecraft:floats_in_water" component. Do you have an official reference for the latter?