User Tools

Site Tools


tutorial:waterloggable

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
tutorial:waterloggable [2023/09/06 08:15] – Change double equals check to proper .isOf() call drakonkinsttutorial:waterloggable [2023/09/06 08:21] (current) – Fix syntax error drakonkinst
Line 35: Line 35:
         return (BlockState)this.getDefaultState()         return (BlockState)this.getDefaultState()
             .with(Properties.HORIZONTAL_FACING, ctx.getPlayerFacing().getOpposite())             .with(Properties.HORIZONTAL_FACING, ctx.getPlayerFacing().getOpposite())
-            .with(WATERLOGGED, ctx.getWorld().getFluidState(ctx.getBlockPos()).getFluid().isOf(Fluids.WATER));+            .with(WATERLOGGED, ctx.getWorld().getFluidState(ctx.getBlockPos()).isOf(Fluids.WATER));
     }     }
 </code> </code>
tutorial/waterloggable.1693988121.txt.gz · Last modified: 2023/09/06 08:15 by drakonkinst