BetterEnd/src/main/java/ru/betterend/blocks/basis/PottableLeavesBlock.java
2021-07-11 23:05:07 +03:00

28 lines
766 B
Java

package ru.betterend.blocks.basis;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.material.MaterialColor;
import ru.bclib.blocks.BaseLeavesBlock;
import ru.betterend.interfaces.PottablePlant;
public class PottableLeavesBlock extends BaseLeavesBlock implements PottablePlant {
private Block sapling;
public PottableLeavesBlock(Block sapling, MaterialColor color) {
super(sapling, color);
this.sapling = sapling;
}
public PottableLeavesBlock(Block sapling, MaterialColor color, int light) {
super(sapling, color, light);
this.sapling = sapling;
}
@Override
public boolean canPlantOn(Block block) {
if (sapling instanceof PottablePlant) {
((PottablePlant) sapling).canPlantOn(block);
}
return true;
}
}