package net.minecraft.world.level.block;

import net.minecraft.world.phys.Vec3;
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.level.block.state.BlockBehaviour;
import net.minecraft.world.effect.MobEffect;
import net.minecraft.world.phys.shapes.VoxelShape;

public class FlowerBlock extends BushBlock {
    protected static final VoxelShape SHAPE;
    private final MobEffect suspiciousStewEffect;
    private final int effectDuration;
    
    public FlowerBlock(final MobEffect aoe, final int integer, final Properties c) {
        super(c);
        this.suspiciousStewEffect = aoe;
        if (aoe.isInstantenous()) {
            this.effectDuration = integer;
        }
        else {
            this.effectDuration = integer * 20;
        }
    }
    
    @Override
    public VoxelShape getShape(final BlockState cfj, final BlockGetter bpg, final BlockPos fu, final CollisionContext der) {
        final Vec3 dem6 = cfj.getOffset(bpg, fu);
        return FlowerBlock.SHAPE.move(dem6.x, dem6.y, dem6.z);
    }
    
    @Override
    public OffsetType getOffsetType() {
        return OffsetType.XZ;
    }
    
    public MobEffect getSuspiciousStewEffect() {
        return this.suspiciousStewEffect;
    }
    
    public int getEffectDuration() {
        return this.effectDuration;
    }
    
    static {
        SHAPE = Block.box(5.0, 0.0, 5.0, 11.0, 10.0, 11.0);
    }
}
