...
public ActionResultType use(BlockState stateBlock, World worldIn, BlockPos posBlock, PlayerEntity playerIn, Hand playerHand, BlockRayTraceResult traceBlock)
{
if (!worldIn.isClientSide) {
worldIn.setBlock(new BlockPos(posBlock.getX(), posBlock.getY() + 1, posBlock.getZ()), Blocks.OBSIDIAN.defaultBlockState(), 1);
}
}
...
If I do so, the block will spawn invisible