25 lines
750 B
Java
25 lines
750 B
Java
package ru.betterend.blocks;
|
|
|
|
import net.minecraft.block.BlockState;
|
|
import net.minecraft.util.math.BlockPos;
|
|
import net.minecraft.world.WorldView;
|
|
import net.minecraft.world.gen.feature.Feature;
|
|
import ru.betterend.blocks.basis.FeatureSaplingBlock;
|
|
import ru.betterend.registry.EndBlocks;
|
|
import ru.betterend.registry.EndFeatures;
|
|
|
|
public class PythadendronSaplingBlock extends FeatureSaplingBlock {
|
|
public PythadendronSaplingBlock() {
|
|
super();
|
|
}
|
|
|
|
@Override
|
|
protected Feature<?> getFeature() {
|
|
return EndFeatures.PYTHADENDRON_TREE.getFeature();
|
|
}
|
|
|
|
@Override
|
|
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {
|
|
return world.getBlockState(pos.down()).isOf(EndBlocks.CHORUS_NYLIUM);
|
|
}
|
|
}
|