Continue migration

This commit is contained in:
Aleksey 2021-04-12 16:34:13 +03:00
parent 47ed597358
commit 33dbfbe633
263 changed files with 1450 additions and 1486 deletions

View file

@ -2,9 +2,9 @@ package ru.betterend.blocks;
import java.util.Random;
import net.minecraft.fluid.Fluids;
import net.minecraft.world.level.material.Fluids;
import net.minecraft.core.BlockPos;
import net.minecraft.world.StructureWorldAccess;
import net.minecraft.world.level.WorldGenLevel;
import ru.betterend.blocks.BlockProperties.TripleShape;
import ru.betterend.blocks.basis.UnderwaterPlantWithAgeBlock;
import ru.betterend.registry.EndBlocks;
@ -12,7 +12,7 @@ import ru.betterend.util.BlocksHelper;
public class EndLilySeedBlock extends UnderwaterPlantWithAgeBlock {
@Override
public void grow(StructureWorldAccess world, Random random, BlockPos pos) {
public void grow(WorldGenLevel world, Random random, BlockPos pos) {
if (canGrow(world, pos)) {
BlocksHelper.setWithoutUpdate(world, pos,
EndBlocks.END_LILY.defaultBlockState().with(EndLilyBlock.SHAPE, TripleShape.BOTTOM));
@ -27,7 +27,7 @@ public class EndLilySeedBlock extends UnderwaterPlantWithAgeBlock {
}
}
private boolean canGrow(StructureWorldAccess world, BlockPos pos) {
private boolean canGrow(WorldGenLevel world, BlockPos pos) {
BlockPos up = pos.up();
while (world.getBlockState(up).getFluidState().getFluid().equals(Fluids.WATER.getStill())) {
up = up.up();