More pottable plants & config save/load
This commit is contained in:
parent
e41fd592c7
commit
797db9d2d4
17 changed files with 310 additions and 28 deletions
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue