Mossy bone, multiple terrain plants
This commit is contained in:
parent
ed286099ee
commit
d32eae2c06
11 changed files with 102 additions and 8 deletions
|
@ -5,15 +5,20 @@ import net.minecraft.block.BlockState;
|
|||
import ru.betterend.blocks.basis.EndPlantBlock;
|
||||
|
||||
public class TerrainPlantBlock extends EndPlantBlock {
|
||||
private final Block ground;
|
||||
private final Block[] ground;
|
||||
|
||||
public TerrainPlantBlock(Block ground) {
|
||||
public TerrainPlantBlock(Block... ground) {
|
||||
super(true);
|
||||
this.ground = ground;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isTerrain(BlockState state) {
|
||||
return state.isOf(ground);
|
||||
for (Block block: ground) {
|
||||
if (state.isOf(block)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue