72 lines
2.4 KiB
Java
72 lines
2.4 KiB
Java
package net.minecraft.world.level.block;
|
|
|
|
import net.minecraft.world.entity.EntityType;
|
|
import net.minecraft.world.level.pathfinder.PathComputationType;
|
|
import net.minecraft.world.level.LevelReader;
|
|
import net.minecraft.world.level.Level;
|
|
import net.minecraft.world.level.LevelAccessor;
|
|
import java.util.Random;
|
|
import net.minecraft.server.level.ServerLevel;
|
|
import net.minecraft.world.phys.shapes.CollisionContext;
|
|
import net.minecraft.core.BlockPos;
|
|
import net.minecraft.world.level.BlockGetter;
|
|
import net.minecraft.world.level.block.state.BlockState;
|
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
|
|
|
public class SoulsandBlock extends Block {
|
|
protected static final VoxelShape SHAPE;
|
|
|
|
public SoulsandBlock(final Properties c) {
|
|
super(c);
|
|
}
|
|
|
|
@Override
|
|
public VoxelShape getCollisionShape(final BlockState byg, final BlockGetter bjd, final BlockPos fk, final CollisionContext cvn) {
|
|
return SoulsandBlock.SHAPE;
|
|
}
|
|
|
|
@Override
|
|
public void tick(final BlockState byg, final ServerLevel xd, final BlockPos fk, final Random random) {
|
|
BubbleColumnBlock.growColumn(xd, fk.above(), false);
|
|
}
|
|
|
|
@Override
|
|
public void neighborChanged(final BlockState byg, final Level bjt, final BlockPos fk3, final Block bpe, final BlockPos fk5, final boolean boolean6) {
|
|
bjt.getBlockTicks().scheduleTick(fk3, this, this.getTickDelay(bjt));
|
|
}
|
|
|
|
@Override
|
|
public boolean isRedstoneConductor(final BlockState byg, final BlockGetter bjd, final BlockPos fk) {
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public int getTickDelay(final LevelReader bjw) {
|
|
return 20;
|
|
}
|
|
|
|
@Override
|
|
public void onPlace(final BlockState byg1, final Level bjt, final BlockPos fk, final BlockState byg4, final boolean boolean5) {
|
|
bjt.getBlockTicks().scheduleTick(fk, this, this.getTickDelay(bjt));
|
|
}
|
|
|
|
@Override
|
|
public boolean isPathfindable(final BlockState byg, final BlockGetter bjd, final BlockPos fk, final PathComputationType cqo) {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public boolean isValidSpawn(final BlockState byg, final BlockGetter bjd, final BlockPos fk, final EntityType<?> akr) {
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public boolean isViewBlocking(final BlockState byg, final BlockGetter bjd, final BlockPos fk) {
|
|
return true;
|
|
}
|
|
|
|
static {
|
|
SHAPE = Block.box(0.0, 0.0, 0.0, 16.0, 14.0, 16.0);
|
|
}
|
|
}
|