25 lines
837 B
Java
25 lines
837 B
Java
package net.minecraft.world.level.block;
|
|
|
|
import net.minecraft.world.item.BlockPlaceContext;
|
|
import net.minecraft.world.level.block.state.BlockState;
|
|
import net.minecraft.world.level.block.state.properties.DoubleBlockHalf;
|
|
import net.minecraft.world.level.block.state.properties.EnumProperty;
|
|
|
|
public class ShearableDoublePlantBlock extends DoublePlantBlock {
|
|
public static final EnumProperty<DoubleBlockHalf> HALF;
|
|
|
|
public ShearableDoublePlantBlock(final Properties c) {
|
|
super(c);
|
|
}
|
|
|
|
@Override
|
|
public boolean canBeReplaced(final BlockState byg, final BlockPlaceContext bcn) {
|
|
final boolean boolean4 = super.canBeReplaced(byg, bcn);
|
|
return (!boolean4 || bcn.getItemInHand().getItem() != this.asItem()) && boolean4;
|
|
}
|
|
|
|
static {
|
|
HALF = DoublePlantBlock.HALF;
|
|
}
|
|
}
|