More pottable plants & config save/load

This commit is contained in:
paulevsGitch 2021-07-11 23:05:07 +03:00
parent e41fd592c7
commit 797db9d2d4
17 changed files with 310 additions and 28 deletions

View file

@ -0,0 +1,28 @@
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;
}
}