New sounds, registry rename
This commit is contained in:
parent
c609f98ec2
commit
1c03ecb5e3
105 changed files with 1449 additions and 1447 deletions
|
@ -5,7 +5,7 @@ import java.util.Random;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.StructureWorldAccess;
|
||||
import ru.betterend.blocks.basis.BlockPlantWithAge;
|
||||
import ru.betterend.registry.BlockRegistry;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
|
@ -20,16 +20,16 @@ public class BlueVineFeature extends ScatterFeature {
|
|||
public boolean canGenerate(StructureWorldAccess world, Random random, BlockPos center, BlockPos blockPos, float radius) {
|
||||
float d = MHelper.length(center.getX() - blockPos.getX(), center.getZ() - blockPos.getZ()) / radius * 0.6F + random.nextFloat() * 0.4F;
|
||||
small = d > 0.5F;
|
||||
return BlockRegistry.BLUE_VINE_SEED.canPlaceAt(AIR, world, blockPos);
|
||||
return EndBlocks.BLUE_VINE_SEED.canPlaceAt(AIR, world, blockPos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate(StructureWorldAccess world, Random random, BlockPos blockPos) {
|
||||
if (small) {
|
||||
BlocksHelper.setWithoutUpdate(world, blockPos, BlockRegistry.BLUE_VINE_SEED.getDefaultState().with(BlockPlantWithAge.AGE, random.nextInt(4)));
|
||||
BlocksHelper.setWithoutUpdate(world, blockPos, EndBlocks.BLUE_VINE_SEED.getDefaultState().with(BlockPlantWithAge.AGE, random.nextInt(4)));
|
||||
}
|
||||
else {
|
||||
BlockPlantWithAge seed = ((BlockPlantWithAge) BlockRegistry.BLUE_VINE_SEED);
|
||||
BlockPlantWithAge seed = ((BlockPlantWithAge) EndBlocks.BLUE_VINE_SEED);
|
||||
seed.grow(world, random, blockPos);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue