Blossoming berry feature
This commit is contained in:
parent
89e327240d
commit
e96753eb2e
3 changed files with 7 additions and 0 deletions
|
@ -7,6 +7,7 @@ import net.minecraft.block.BlockState;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.StructureWorldAccess;
|
||||
import ru.betterend.blocks.basis.DoublePlantBlock;
|
||||
import ru.betterend.blocks.basis.EndCropBlock;
|
||||
import ru.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
|
||||
|
@ -56,6 +57,10 @@ public class SinglePlantFeature extends ScatterFeature {
|
|||
BlocksHelper.setWithoutUpdate(world, blockPos, state);
|
||||
BlocksHelper.setWithoutUpdate(world, blockPos.up(), state.with(DoublePlantBlock.TOP, true));
|
||||
}
|
||||
else if (plant instanceof EndCropBlock) {
|
||||
BlockState state = plant.getDefaultState().with(EndCropBlock.AGE, 3);
|
||||
BlocksHelper.setWithoutUpdate(world, blockPos, state);
|
||||
}
|
||||
else if (plant instanceof EndPlantWithAgeBlock) {
|
||||
int age = random.nextInt(4);
|
||||
BlockState state = plant.getDefaultState().with(EndPlantWithAgeBlock.AGE, age);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue