package net.minecraft.world.level.block;

import javax.annotation.Nullable;
import net.minecraft.world.MenuProvider;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.BlockBehaviour;

public abstract class BaseEntityBlock extends Block implements EntityBlock {
    protected BaseEntityBlock(final Properties c) {
        super(c);
    }
    
    @Override
    public RenderShape getRenderShape(final BlockState cfj) {
        return RenderShape.INVISIBLE;
    }
    
    @Override
    public boolean triggerEvent(final BlockState cfj, final Level bqb, final BlockPos fu, final int integer4, final int integer5) {
        super.triggerEvent(cfj, bqb, fu, integer4, integer5);
        final BlockEntity cdl7 = bqb.getBlockEntity(fu);
        return cdl7 != null && cdl7.triggerEvent(integer4, integer5);
    }
    
    @Nullable
    @Override
    public MenuProvider getMenuProvider(final BlockState cfj, final Level bqb, final BlockPos fu) {
        final BlockEntity cdl5 = bqb.getBlockEntity(fu);
        return (cdl5 instanceof MenuProvider) ? cdl5 : null;
    }
}
