BetterEnd/src/main/java/ru/betterend/blocks/CharniaBlock.java
2021-04-08 21:55:07 +03:00

16 lines
581 B
Java

package ru.betterend.blocks;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.fluid.Fluids;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.WorldView;
import ru.betterend.blocks.basis.UnderwaterPlantBlock;
public class CharniaBlock extends UnderwaterPlantBlock {
@Override
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {
return sideCoversSmallSquare(world, pos.below(), Direction.UP)
&& world.getFluidState(pos).getFluid() == Fluids.WATER;
}
}