Mossy bone, multiple terrain plants

This commit is contained in:
paulevsGitch 2021-03-01 04:27:21 +03:00
parent ed286099ee
commit d32eae2c06
11 changed files with 102 additions and 8 deletions

View file

@ -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;
}
}