Continue mapping migration

This commit is contained in:
Aleksey 2021-04-12 21:38:22 +03:00
parent 99ade39404
commit f03fd03bd0
499 changed files with 12567 additions and 12723 deletions

View file

@ -4,11 +4,11 @@ import java.util.Random;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.core.BlockPos;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.state.BlockState;
import ru.betterend.blocks.basis.DoublePlantBlock;
import ru.betterend.blocks.basis.EndPlantBlock;
import ru.betterend.registry.EndBlocks;
@ -18,32 +18,32 @@ public class UmbrellaMossBlock extends EndPlantBlock {
public UmbrellaMossBlock() {
super(11);
}
@Override
protected boolean isTerrain(BlockState state) {
return state.is(EndBlocks.END_MOSS) || state.is(EndBlocks.END_MYCELIUM) || state.is(EndBlocks.JUNGLE_MOSS);
}
@Environment(EnvType.CLIENT)
public boolean hasEmissiveLighting(BlockView world, BlockPos pos) {
return true;
}
public boolean hasEmissiveLighting(BlockGetter world, BlockPos pos) {
return true;
}
@Environment(EnvType.CLIENT)
public float getAmbientOcclusionLightLevel(BlockView world, BlockPos pos) {
return 1F;
@Environment(EnvType.CLIENT)
public float getAmbientOcclusionLightLevel(BlockGetter world, BlockPos pos) {
return 1F;
}
@Override
public boolean isBonemealSuccess(Level world, Random random, BlockPos pos, BlockState state) {
return world.isEmptyBlock(pos.above());
}
@Override
public boolean canGrow(Level world, Random random, BlockPos pos, BlockState state) {
return world.isAir(pos.up());
}
@Override
public void grow(ServerLevel world, Random random, BlockPos pos, BlockState state) {
int rot = world.random.nextInt(4);
BlockState bs = EndBlocks.UMBRELLA_MOSS_TALL.defaultBlockState().with(DoublePlantBlock.ROTATION, rot);
@Override
public void performBonemeal(ServerLevel world, Random random, BlockPos pos, BlockState state) {
int rot = world.random.nextInt(4);
BlockState bs = EndBlocks.UMBRELLA_MOSS_TALL.defaultBlockState().setValue(DoublePlantBlock.ROTATION, rot);
BlocksHelper.setWithoutUpdate(world, pos, bs);
BlocksHelper.setWithoutUpdate(world, pos.up(), bs.with(DoublePlantBlock.TOP, true));
BlocksHelper.setWithoutUpdate(world, pos.above(), bs.setValue(DoublePlantBlock.TOP, true));
}
}