Start migration

This commit is contained in:
Aleksey 2021-04-08 21:55:07 +03:00
parent 6630ce0cab
commit 47ed597358
491 changed files with 12045 additions and 11953 deletions

View file

@ -2,9 +2,9 @@ package ru.betterend.blocks;
import java.util.Random;
import net.minecraft.block.BlockState;
import net.minecraft.tag.BlockTags;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.tags.BlockTags;
import net.minecraft.core.BlockPos;
import net.minecraft.world.StructureWorldAccess;
import net.minecraft.world.WorldView;
import ru.betterend.blocks.BlockProperties.TripleShape;
@ -24,11 +24,14 @@ public class BulbVineSeedBlock extends EndPlantWithAgeBlock {
public void growAdult(StructureWorldAccess world, Random random, BlockPos pos) {
int h = BlocksHelper.downRay(world, pos, random.nextInt(24)) - 1;
if (h > 2) {
BlocksHelper.setWithoutUpdate(world, pos, EndBlocks.BULB_VINE.getDefaultState().with(BlockProperties.TRIPLE_SHAPE, TripleShape.TOP));
BlocksHelper.setWithoutUpdate(world, pos,
EndBlocks.BULB_VINE.defaultBlockState().with(BlockProperties.TRIPLE_SHAPE, TripleShape.TOP));
for (int i = 1; i < h; i++) {
BlocksHelper.setWithoutUpdate(world, pos.down(i), EndBlocks.BULB_VINE.getDefaultState().with(BlockProperties.TRIPLE_SHAPE, TripleShape.MIDDLE));
BlocksHelper.setWithoutUpdate(world, pos.down(i),
EndBlocks.BULB_VINE.defaultBlockState().with(BlockProperties.TRIPLE_SHAPE, TripleShape.MIDDLE));
}
BlocksHelper.setWithoutUpdate(world, pos.down(h), EndBlocks.BULB_VINE.getDefaultState().with(BlockProperties.TRIPLE_SHAPE, TripleShape.BOTTOM));
BlocksHelper.setWithoutUpdate(world, pos.down(h),
EndBlocks.BULB_VINE.defaultBlockState().with(BlockProperties.TRIPLE_SHAPE, TripleShape.BOTTOM));
}
}
}