package net.minecraft.world.item;

import net.minecraft.world.level.block.entity.SignBlockEntity;
import net.minecraft.world.level.block.state.BlockState;
import javax.annotation.Nullable;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.Level;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.block.Block;

public class SignItem extends StandingAndWallBlockItem {
    public SignItem(final Properties a, final Block bph2, final Block bph3) {
        super(bph2, bph3, a);
    }
    
    @Override
    protected boolean updateCustomBlockEntityTag(final BlockPos fk, final Level bjw, @Nullable final Player ayj, final ItemStack ben, final BlockState byj) {
        final boolean boolean7 = super.updateCustomBlockEntityTag(fk, bjw, ayj, ben, byj);
        if (!bjw.isClientSide && !boolean7 && ayj != null) {
            ayj.openTextEdit((SignBlockEntity)bjw.getBlockEntity(fk));
        }
        return boolean7;
    }
}
