Skip to content

Commit

Permalink
fixed ice lily placement
Browse files Browse the repository at this point in the history
  • Loading branch information
NewJumper committed May 2, 2024
1 parent 2b9b35b commit c2c8d2c
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -6,6 +6,7 @@
import net.minecraft.world.entity.vehicle.Boat;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.LevelReader;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.BushBlock;
import net.minecraft.world.level.block.IceBlock;
Expand Down Expand Up @@ -40,6 +41,11 @@ public void entityInside(BlockState pState, Level pLevel, BlockPos pPos, Entity
}
}

@Override
public boolean canSurvive(BlockState pState, LevelReader pLevel, BlockPos pPos) {
return mayPlaceOn(pLevel.getBlockState(pPos.below()), pLevel, pPos.below());
}

@Override
public VoxelShape getShape(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) {
return Shapes.or(LILY_PAD, FLOWER);
Expand Down

0 comments on commit c2c8d2c

Please sign in to comment.