Create

Create

86M Downloads

[Forge 1.19.2] Create needs to use FluidType's and canDrownIn methods for Copper Backtank item

TelepathicGrunt opened this issue ยท 0 comments

commented

Describe the Bug

With Forge's fluid refactors, the vanilla getEyeInFluidType method will not work for any modded fluid because Forge prevents the modded fluid's tag from getting into the field inside. Instead, Forge works with FluidTypes and requires mods to do the same. In this case, you need to use Entity$getEyeInFluidType to get the fluid type the player is in. Then check the FluidType$canDrownIn method to know if this is a fluid that the air tank should be activated in

image

boolean lavaDiving = entity.isEyeInFluid(FluidTags.LAVA);
if (!entity.isEyeInFluid(FluidTags.WATER) && !lavaDiving)

Reproduction Steps

Put on Bumblezone and Create.

Put on the Diving Helmet and Copper Backtank.

Do /fill ~ ~ ~ ~20 ~-10 ~20 the_bumblezone:sugar_water

Go into the Sugar Water.

See air bubbles depleting and Backtank ignored

Expected Result

Copper Backtank to work for all modded fluids that can drown the player

Screenshots and Videos

Example in Honey Fluid from Bumblezone. Also doesn't work with the water-tagged Sugar Water fluid from Bumblezone
image

Crash Report or Log

No response

Operating System

Windows 10

Mod Version

0.5.0i

Minecraft Version

1.19.2

Forge Version

43.2.3

Other Mods

Bumblezone https://beta.curseforge.com/minecraft/mc-mods/the-bumblezone-forge

Additional Context

No response